Many of the domains and sub-domains on my Media Temple Grid Service contain installations of WordPress. Since I don’t want to be bothered by a normal upgrades here is how I install WordPress in a way that allows for simple upgrades.
This is not a completely automated solution, there is more that you could do to improve the process, but it should save a lot of the time normally spent updating WordPress.
Note: the provided script will only work if you do the WordPress install using subversion and in the domain/sub-domain’s html/ directory.
Installing WordPress
Yes, there is a 1-click install for installing WordPress on the (gs), but I don’t use it. Here is how I install WordPress on a domain or sub-domain (ex: blog.site.org):
- Ensure that you have an alternate domain or sub-domain created that has an empty
html/directory. - Find the latest tag listed in the WordPress repository. (ex: 2.8.3)
- SSH into the (gs) as the serveradmin.
cd domains/blog.site.org/htmlsvn checkout http://svn.automattic.com/wordpress/tags/2.8.3/ ./ --force
Once the svn checkout is complete you should be able to visit the install page (ex: blog.site.org/wp-admin/install.php) and finish the installation of WordPress like normal.
I also suggest you take steps to harden your WordPress install.
Upgrading Many WordPress Installs at Once
When you learn of a new version of WordPress you can do the following to easily upgrade all of your installations at once.
- SSH into the (gs) as the serveradmin.
- You will need to upload the updateWP bash script to your serveradmin home directory (
~/) if it does not already exist. - Run the bash script with the new version number:
./updateWP.sh 2.8.4 - The script will look at each of your domains to see if you have WordPress installed. If it finds WordPress it will switch to the new tag.
- After all the installs are updated you can view the
updateWP.logto see all of the installations that were completed. On some tags you may need to go to each of the/wp-admin/page and manually tell it to update the database. You can check if this is necessary by visiting one of your WordPress install’s/wp-admin/directory.