Updating WordPress with Subversion

For various reasons, I’ve decided to start updating my WordPress install with Subversion. The process is very simple and safe, if you follow some simple steps from your SSH or Telnet session. Note: you have to have Subversion installed on the server you’re trying to do this on. Try doing the first “svn…” command below on a temp directory to find out if you have it. (Many hosts have it pre-installed, including mine, Dreamhost.)

For these examples, we’ll assume that I’m in a folder that contains the folder that this domain’s files are in. First, we’ll want to make a backup of my files and then delete everything inside the subfolder for the domain. You can skip this if you’re doing a fresh install.

tar czvf dancoulter.com.tar.gz dancoulter.com
rm -rf dancoulter.com/*

Next, check out the Subversion “tag” that corresponds to the version of WordPress you were using. I was using 2.2, so it looks like this:

svn co http://svn.automattic.com/wordpress/tags/2.2/ dancoulter.com/

Now, if you have made a backup of your files (if you’ve made any changes to your theme, or uploaded any files or plugins, you definitely need to do this), simply unzip that backup file you made before.

tar xzf dancoulter.com.tar.gz

If you look at your WordPress site now, you’ll see that it should be working normally.

Now to upgrade (this is the only step you’ll need to do to upgrade files from now on), just point your Subversion “working copy” to the new “tag”. I was upgrading from 2.2 to 2.2.1, so I just ran this command from the ssh prompt.

svn switch http://svn.automattic.com/wordpress/tags/2.2.1/ dancoulter.com/

Leave a Reply

Your email is never published nor shared. Required fields are marked *