Upgrading WordPress to 2.6.1 – The Sequel (and conclusion)

MySQL WorkbenchImage via Wikipedia Notes from my fun and games with WordPress on Debian/etch ……

OK – so from my earlier post, I was having trouble upgrading WordPress on my main server. Having tried to blag my way through using the WordPress Automatic Upgrade plugin – and failed – I turned to the docs on the WordPress site.
Deep breath and go slowly. Most importantly, I backed up the existing WordPress main directory. I just copied it over on the same server as follows :

> cd /usr/share
> mkdir wordpressold
> cp -r wordpress/ wordpressold

This copies the entire wordpress directory structure into the wordpressold directory (i.e. the copy is at /usr/share/wordpressold/wordpress/). You can check the copy is the same as the old one by running diff (I imagine) or, as I did, by comparing the disk usage of both directories:

> du -h wordpress/

and

> du -h wordpressold/

Both came out as 11M (the -h tag tells du to give you ‘human-readable’ output – bits and bytes !) so I assumed all was well. I also backed up the MySQL instance using the MySQL GUI Tools (MySQL Administrator). Its a breeze so I highly recommend them – get them from the MySQL site.

I then took a breath and deleted the original wordpress directory:

> rm -dR wordpress/

Gone. Now to upload the entire wordpress/ directory from my Mac using SFTP within Cyberduck. Done in 5 minutes. I was a bit worried when the size was reported as only 4.3MB but I assumed all was well. I copied the original config over from the wordpressold/wordpress/wp-config.php file to the new directory. [Note: as a Debian user, the WordPress config is actually stored in /etc/wordpress and referenced by the wp-config.php file. Its important to keep this file – wp-config.php – somewhere so it can be copied back. Its a relatively neat way to remove the actual configuration – database credentials etc. – from the main wordpress directory and keep them in the /etc/ location].

> cp /usr/share/wordpressold/wordpress/wp-config.php /usr/share/wordpress/

I then pointed to the site, got a brand new themed login form. I logged in and was automatically directed to the Upgrade process. Completed in seconds and all was well.

Phew !

Now off to see if the plugins work on the new version.

%d bloggers like this: