Upgrading WordPress using rsync
After the recent flurry of WordPress upgrades I started looking for an easier way to upgrade. This post at techites.com was a good start, but this comment on the post, using rsync, sounded much easier. Here’s the workflow I figured out:
wget http://wordpress.org/latest.zip(download the latest version)unzip wordpress-XXX.zip(extract it)mv wordpress [your-site's-folder-name](rename the wordpress folder to the name of the folder your blog lives in on the server)rsync -avrz [your-site's-folder-name] [username@server]:[path-to-blog-folder](update the remote folder with the local folder)
Repeat the last two steps for each install you want to update. I’m sure it’s possible to write a script to do this for a whole bunch of installs at once if desired. You may want to test all this out on your local testing server beforehand.
Update: Jonathan’s right, Subversion is a VERY easy way to update WordPress…once you’ve got it set up. This Codex page describes the process. It’s easiest to do if you’re either just setting up your blog or if you only have a couple of plugins or themes installed. There are other benefits to using Subversion. You can easily switch from using the current release version to using the bleeding edge version, for instance to test out a release candidate. The WP Subversion repository also wasn’t affected by the recent security exploit, so there may be a security advantage.

March 6th, 2007 at 8:05 pm
Is rsync installed by default on servers? Or do you need to install it?
March 6th, 2007 at 8:23 pm
If you have shell access at your host then you can do
which rsyncto find out if it’s there. If it’s not but your host lets you install stuff locally (or if the server is yours) then you can try to install it yourself.April 7th, 2007 at 6:29 pm
I svn. It’s probably a little more difficult to get set up at first, but upgrades are a snap: svn up. Done. :o)
By the way, thanks for photopress. That’s the very thing I’ve been looking for all along.