WordPress Guy

WordPress Guy designs and develops WordPress themes and plugins. WordPress Guy teaches you WordPress stuff.

Lately I was having a lot of trouble updating the WordPress installs on all the blogs that I manage. Doing it with FTP can be extremely slow and time consuming. I used to upload the zipped WordPress directory and then unzipping and updating via SSH, however, this still was pretty complicated. I’ve been wanting to try updating WordPress via Subversion for ages, and I finally did.

There is an article about this on the WordPress site, but I’m going to outline what worked for me.

Connecting to your host via SSH

First, you need to have access to your host via SSH. If you don’t know how to do this, ask your hosting provider.

Installing Subversion

My MediaTemple DV server didn’t have Subversion installed, that’s one of the reasons I didn’t use it. So first, I had to install it. After a couple of hours of reading tutorials, installing packages and beating my head against the wall, I found out that you can get Subversion and other stuff by installing something they call “Developer Tools” from the admin panel.

Again, if you don’t have Subversion installed on your server, the best option is to ask your host.

Seting up a Subversion repository

For the sake of this tutorial let’s assume that your current WordPress install is at root level (”/WordPress”).

Here comes the fun part… Once you’re connected to your host via SSH you’ll have to create a temporary directory where we’re going to setup our repository (this varies depending on your setup):

cd /
mkdir wp
cd wp

Now download the latest WordPress version (currently 2.5.1):

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

To avoid problems later, I’m removing everything from the wp-content directory:

rm -rf wp-content/themes
rm -rf wp-content/plugins
rm -f wp-content/index.php

Then we’re going to copy the custom stuff from our current WordPress, that is, the themes, the plugins, the uploads, etc.

cp -rpf /WordPress/wp-content/* wp-content
cp -p /WordPress/wp-config.php .htaccess ./

Now we rename the old WordPress directory to something else and the new one to what the old one was called.

mv /WordPress /WordPress.bak
mv wp /WordPress

That’s it. Check that your blog is still working, if something went wrong you can just revert to the old version by doing the last commands the other way around:

mv /WordPress /wp
mv /WordPress.bak /WordPress

From now on, you can easily update using the following command (changing the “2.5.1″ part to the appropriate version, of course):

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

It sure is a complicated process if you don’t have much terminal / shell / ssh experience, but it’s definitely worth the effort.

Comments

  • June 29th, 2008 at 5:47 pm

    ... Mettre à jour WordPress facilement en utilisant Subversion, chez WPGuy, ...

  • August 3rd, 2008 at 3:42 am

    Thanks for the post

  • Nick
    July 14th, 2009 at 7:18 am

    Thank you appreciate your help

  • October 9th, 2010 at 12:37 am

    Good tutorial.
    Thanks a lot..

  • October 27th, 2011 at 8:51 am

    oo nice and good tutorial thanks lot

  • March 19th, 2012 at 4:31 pm

    thanks for share this tips

  • October 5th, 2013 at 3:03 am

    These tips are awesome! Might as well consider these tips and hire wordpress developer. I wanted to know the best ways to deal with my site but this is also helpful.

  • September 6th, 2015 at 4:03 am

    I messed up my site pretty bad. Had to recover from the backup :P

  • February 4th, 2016 at 7:50 am

    Purple Hyderabad Model service is a famous for client satisfaction.

  • February 4th, 2016 at 7:53 am

    Suzane Escorts allow you to book their high profile Hyderabad Model girls waiting to give you full Physical satisfaction.

  • February 4th, 2016 at 7:56 am

    Independent Hyderabad model, if you are disturb to daily work then you can fix your dating.

  • February 4th, 2016 at 7:57 am

    I am offer Independent Models Girls independently, Independent female Girls, Independent Call Girls Models and etc.

  • February 4th, 2016 at 7:57 am

    Meghna Mathur offers you genuine independent Hyderabad Model service. Hire Meghan to make your night/day unforgettable with a sizzling Hyderabad Modelgirl.

Your Comment