If..Else Log

If Else upgraded to WP2.02

In case anyone is interested, I've finally upgraded to WP 2.02. If anything is broken, let me know.

Time spent, time saved

To make future upgrades less painful, I'm now checking out the codebase via SVN. This should mean that upgrades will be a simple one-command procedure instead of the usual labourious copying and ftping. If you're on Dreamhost, this should be relatively simple as SVN is already installed.

A quick intro to SVN and WP

Using Putty, login into your account using SSH.
On DH, each domain is represented by a directory named after your domain (i.e. ifelse.co.uk would be maintained within ~/ifelse.co.uk).

With this in mind, so as to minimise site disruption, create a temporary staging directory in your home area (I called it temp-ifelse.co.uk). What we're going to do is to download and copy all the necessary files to this directory and, only once everything is ready, we will make the site live by switching directories.

Navigate into this staging directory and using SVN, checkout the WP2.02 release via the following:

svn co http://svn.automattic.com/wordpress/branches/2.0/ .

Now, copy all the non-core-WP files (e.g. your images, themes etc) from your live site. Make sure to copy your wp-config.php file as well e.g.

cp ~/ifelse.co.uk/wp-config.php .

Once everything is in place, switch the staging area with the live site i.e.

mv ~/ifelse.co.uk mv ~/old-ifelse.co.uk
mv ~/temp-ifelse.co.uk mv ~/ifelse.co.uk

Then, proceed to [SITE]/wp-admin/upgrade.php and follow the instructions.

Once we have a SVN checkout, upon the next WP release, instead of having to spend time manually uploading/updating files, we can just run

svn update

Remember though, make sure you're familiar with source-control and confident about the process before embarking.

-30-

4 Responses to “If Else upgraded to WP2.02”

  1. Gravatar brendan

    SVN, excellent.

    It’s a great resource that literally makes updates a single line job.

    Few people seem to really consider it an option, but trust me, once you start using it - you will wonder how you ever managed without it. :)

  2. Gravatar Simon

    Being the smart guy you are you’re probably on top of this already, but I couldn’t resist pluggin my own gear while trying to make it look like I’m just helping out.

    I think you still use my Footnotes plugin from time to time. Now that you’ve upgraded WP you’ll need to upgrade footnotes as well (although, really only if you use the WYSIWYG interface).

    Cheers,
    Simon

  3. Gravatar marcoss

    I do something similar to keep all my sites updated.

    Just one thing you forgot to explain, is what to do once you have all the structure in the “staging ” directory.

    You will need to either rename it switching the live with the temp, or just overwrite all the files in the “live” folder with ones in the temporary one.

  4. Gravatar Phu

    Simon,
    I’m not using the WYSIWYG editor but I should probably update. Cheers for the heads up.

    Marcoss,
    Thanks for that:) Somehow, I missed out mentioning that fairly crucial step!