WordPress 2.8.4 Upgrade

3 Oct 2009

This blog was running under WordPress 2.3.2 for far too long. I had put in some patches, and there were security announcements about problems that wouldn’t affect this blog, since I didn’t use or enable the affected features. With the systems and application monitoring that I have in place, I wasn’t that worried. Still, I had started to update to 2.5.1 and 2.6 and 2.7 following their respective releases. Today, I finally took an hour and did the upgrade to the currently available version. I know, I know … that probably means that 2.8.5 will come out this afternoon.

The reason that it took an hour was that I was forced to upgrade several plugins and fix a couple of configurations. No big deal. It went pretty smoothly. Here are the basic steps that I go through:

  1. Backup the DB
  2. Move he current install out of the way
  3. Extract the new code base
  4. Copy the wp-config.php file to the new code directory

So, for example, I will run commands like these:

$ mysqldump -p dbname | gzip -9 >~/backups/dbname.sql.gz
$ mv web-server-vhost-dir/docroot/wordpress-blog-dir/ web-server-vhost-dir/
$ cd web-server-vhost-dir/docroot/
$ tar -zxf ~/wordpress-version.tar.gz
$ cp web-server-vhost-dir/wordpress-blog-dir/wp-config.php wordpress/
$ mv wordpress/ wordpress-blog-dir

Obviously, you need to replace the italic parts above with filenames and directories that match your setup. Perhaps you structure your website differently and the WordPress code will be in the root of your webspace.

After the new code is in place with the wp-config.php file copied in:

  1. Hit the admin page in a web browser
  2. Click the “Update Database” button
  3. Test
  4. Fix plugins, theme, caching, etc. (mostly file and directory owners/groups and permissions)

If there’s a problem, simply move the new code out of the way (or delete it, if you prefer) and copy or move the old one back into place. If the DB update process was run, you will have to restore your database to its previous state. This is easily accomplished with a single mysql command::

$ zcat ~/backups/year-month-day-dbname.sql.gz | mysql -p dbname

You’ll be so glad that you had that backup file.


Actions

Informations

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>