Upgrading and Installing WordPress from Subversion

WordPress 2.2.2 was released this morning (upgrade, really, do), and for the first time since I moved to my new server (about which I will post more soon), I had the fun of updating all my WordPress blogs. Normally, updating WordPress wasn’t any fun, as it meant copying all sorts of files all over the place, and doing that not once or twice, but for every WordPress I have running for me and my clients (14 at the moment…).

This time was different though… When I moved all the sites to my new server, I installed all the WordPress files from Subversion each time. You can read how to do that here, but basically it’s one line, this one is for WordPress 2.2.1:

svn co http://svn.automattic.com/wordpress/tags/2.2.1 .

Now that’s pretty easy, and because you did this from Subversion, you can now switch to WordPress 2.2.2 with just this ONE line:

svn sw http://svn.automattic.com/wordpress/tags/2.2.2

Of course this is only possible for those of us who have command line access to our servers, but it is very easy compared to the normal upgrade process… Now you can also switch your normal install to a subversion install very easily, in fact, this upgrade might be the perfect time to do it! There’s a full explanation of what to do here. Good luck!

Update: don’t forget to switch off ALL plugins and switch them on again one by one, saves you loads of trouble!

Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

22 Responses

  1. JamesBy James on 6 August, 2007

    That is EXCELLENT info. I know I’ve seen it before, but this post comes at the EXACT moment I was swearing in my head that I now had to go through and upgrade all my blogs again.

    The reason I was swearing was because I had a PEBKAC moment last month and deleted one of my blogs during an upgrade and had to restore it file by file (I skipped the backup step as well, bloody hell)!

  2. John StevensBy John Stevens on 7 August, 2007

    This is a very good tip Joost! Just starting with WordPress and already was very impressed by the user-kindness of it. So this is an extra bonus to it :)

  3. JamesBy James on 8 September, 2007

    Hi Joost. A little question: when you do the “svn up” or “svn sw”, do you not get the following message for all your plugin and theme directories:

    svn: Directory ‘wp-content/themes/sometheme/.svn’ containing working copy admin area is missing

  4. Joost de ValkBy Joost de Valk on 8 September, 2007

    @James: well, no :) You only have to do svn sw in the root, not anywhere else… It’s worked flawlessly for me :)

  5. JamesBy James on 8 September, 2007

    Thanks. I figured out what I was doing wrong. Instead of just copying the directories from the old wp-content to the new wp-content, I had removed the new wp-content first. Which removed all .svn directories which I have a feeling was the cause of the error.

    Oh well. we live and learn. Thanks for your response…

  6. futttaBy futtta on 28 September, 2007

    i wrote a wp upgrade script in bash (so it’s a shell script, really) which makes an attempt at an automatic svn-upgrade. it makes a backup of the wp-db and -fs, turns off plugins, syncs with the latest tagged version using “svn sw� and calls upgrade.php in lynx (text-based browser).

    you can fetch a tar.gz-version of it on http://futtta.be/download/WPuppy.tar.gz.

    more info (in dutch, but there’s an auto translate link in the upper right corner) on: http://blog.futtta.be/2007/09/26/wordpress-automagisch-upgraden-nu-ook-met-hondje/

  7. martijnBy martijn on 5 February, 2008

    dreamhost comes with this one click installer. which also means, 1 click upgrade;
    1 slight problem tho, you have to backup your theme/uploads, etc, and copy them back after you’ve upgraded. painful work if you run multiple WP installations.
    might consider losing the 1 click installers and do everything manually if it saves me the trouble of having to backup everything before i start upgrading.

  8. JamesBy James on 5 February, 2008

    @martijn: I’m not sure I would call it “manual”.

    Instead of 1-click install/upgrade, it’s 1-copy/paste upgrade with no other steps required (re: the moving of files).

    The only other step you might need is a backup command, and I use tar for that…

  9. Jason WadsworthBy Jason Wadsworth on 3 March, 2008

    Upgrading WordPress from subversion makes my life a lot easier. I’d love it if I could upgrade all of my plugins that way as well. I happen to use a couple of your WP plugins (google-analytics and sociable) and I was wondering whether they were available via subversion? I looked around your site a bit, but I couldn’t find your repository, if you have one.

  10. Joost de ValkBy Joost de Valk on 3 March, 2008

    @Jason: all WordPress.org hosted plugins can be checked out from there :)

  11. Jason WadsworthBy Jason Wadsworth on 3 March, 2008

    Boy, I practically had to build a plugin just to find the URLs, but find it, I did:



  12. Jason WadsworthBy Jason Wadsworth on 3 March, 2008

    Oh, and thanks. :)

  13. MarkBy Mark on 25 May, 2009

    Hello! This is great. I’ve got several blogs that I’d upgrade this way. The one thing I am not clear on is, does upgrading this way leave the wp-content folder alone? When I look at what’s in a , it *looks* like SVN will replace wp-content?