Ulyssesonline

the tech surfer

  • Home
  • About
  • Archives
You are here: Home / General / Automatic Upgrade and Subversion

June 16, 2009

Automatic Upgrade and Subversion

I have been using Subversion to manage WordPress upgrades for two years now. When WordPress 2.7 appeared, it came with an Automatic Upgrade feature that made one click upgrade possible. Unfortunately, for those of us who have been using Subversion to switch from one WordPress version to another, the Automatic Upgrade feature breaks Subversion. The .svn directories that are essential for tracking and version control are no longer available.

But, I am happy to say the WordPress upgrade went without a hitch. The WordPress 2.8 files were installed and the database upgrade worked as well. This means only one thing: Automatic Upgrade and Subversion can’t co-exist. You either have to use one or the other. Although nothing could be easier than a one click upgrade, I still feel comfortable using Subversion when upgrading WordPress. Maybe, it’s because I know exactly what happens inside the Subversion upgrade.

In addition, I also have multiple blogs to upgrade each time a new WordPress version comes out. To make life easier, I run a small shell script to upgrade all of my WordPress instances at once. Here’s a sample of the shell script below:

#!/bin/sh

#!/bin/sh

# A script to upgrade several WordPress instances using Subversion.

wpv=http://svn.automattic.com/wordpress/tags/2.8 
 
echo "Upgrading domain.com"
cd /home/user/domain.com/
svn switch $wpv
 
echo "Upgrading domain2.com"
cd /home/user/domain2.com/
svn switch $wpv

wpv=http://svn.automattic.com/wordpress/tags/2.8 echo "Upgrading domain.com" cd /home/user/domain.com/ svn switch $wpv echo "Upgrading domain2.com" cd /home/user/domain2.com/ svn switch $wpv

As you can see, the shell script is quite simple. I just have to make one minor change to the script every time an upgrade is needed, and that is, to assign the latest tag to the $wpv variable.

Filed Under: General, WordPress Tagged With: blogs, subversion, upgrade, WordPress

Comments

  1. rob says

    July 11, 2009 at 7:33 am

    We have a blog we need to upgrade to the latest version. Any step by step instructions to utilize your script or video demo? We would like to upgrade but when we hit the upgrade now button nothing happens. Thanks.

Copyright © 2003 - 2018