WordPress FAQ: What is the best way to upgrade a WordPress 1.5 blog to WordPress 2.1?

Okay… my personal Blog (the one the leaf has been removed from) is an older version of WP (waaaaaay back to 1.5 something) and has been seriously re-designed by Khaled Abou Alfa from 9rules (a dam* good man btw).

I would love to upgrade it to a current version but there is where I lose all touch ‘cuz I ain’t a tecchie like you

I have not the first idea where to begin and honestly am scared silly about screwin’ up the re-design.

This question comes from reader Mark Wade.

Setup a local Version of your Blog

Mark, I’m not sure of what your template uses but chances are, it is already WordPress 2.1 compliant. What I’d suggest doing is setting up a local version of your blog. If you’re using Mac, then you have an out-of-the-box web server already configured with PHP and MySQL. You would just have to setup a database and import your posts/comments/categories to give you actual content using the methods I described in a previous series entry. If you’re on Windows, you might have to employ Kevin Yank’s instructions on setting up Apache, MySQL and PHP locally. It’s not too complex and I generally advise people who do their own mucking around to do this anyway for testing before rolling something to a live blog.

However, you can risk it and try the upgrade first anyway. The problem is, you can’t roll back if you mess something up.

Upgrade Incrementally

Having followed this procedure on your test blog (you did take my advice right? ;-) ), I recommend an upgrade from such an earlier version be done incrementally. That is version 1.5 to 2.0, then version 2.0 to 2.1. In theory, the upgrade can be done directly, but I know of at least one upgrade that got completely borked by making the Big Jump™.

You can download a release version of WP 2.0.x from the build archive. Choose whichever non-RC version you want.

Having done that, the recommended process is to delete everything except wp-config.php (which contains your database connection info and hasn’t changed in several versions) and the wp-content folder which includes your theme and plugins. Upload all the files in the extracted wordpress folder to your blog root. Also upload the wp-admin and wp-includes folder.

Now run the upgrade script to make the modifications to your database. The upgrade script is at wp-admin/upgrade.php. Alternatively, you can attempt to login to your wordpress admin and it will provide a link to upgrade your blog.

Now that you’re upgraded to 2.0, go through and check the functionality of all of your plugins. If anything is broke, go find an upgrade. In fact, I’d check for upgrades anyways in case there have been security fixes. A lot of plugins broke between WP 1.5 and 2.0 and plugin authors have usually provided 2.0 compatible plugins.

If everything checks out, repeat the procedure to bring your blog up to WordPress 2.1.x. The latest is 2.1.3. Again, check your plugins.

In theory, unless your template is relying on deprecated template tags available in previous versions of WP, your theme should remain intact. In general, WP development attempts to preserve backwards compatibility but some functions get removed after being deprecated for several releases. Again, just check. And if you didn’t take my advice about a local version of your blog, shame on you. ;)

A final option you have is to hire me and I’ll take care of the upgrade for you.

As usual, reader questions are being solicited. Drop me an email about any WP question you have at all! :-)