Upgrading to WordPress 2.5.1

After weeks of putting it off, I’ve upgraded to WordPress 2.5.1. I’ve been putting off the upgrade to WP 2.5.x because my WP install was a bit old (2.1.something, I think), and because I had a nagging suspicion (but no solid recollection) that I had mucked about in the WP source to make something work (bad idea), and I was concerned the upgrade might break it. This morning I decided to bite the bullet. If I did have custom changes to the WP source that I have lost, I haven’t noticed any ill effects. Which is not to say that everything went off without a hitch. Herewith some notes, hints, and suggestions on the upgrade.

First off I wanted to be sure I had good backups, because Murphy and I go way back. I host this site on DreamHost, and used their One-Click Installer option to set up WP originally. Because of this, I was able to upgrade with the One-Click Installer, which offers automatic backup of the entire WP directory tree, including your plugins, themes, etc. The whole tree is copied to a .old directory before any changes are made. Excellent. That only left backing up the database.

WordPress uses MySql , and there are a number of ways to backup a MySql database. Because my hosting account includes shell access (all DreamHost accounts do), I just did a full dump from the command line, which is dead simple and wicked fast:

mysqldump --opt -p -uMySqlUsername -h MySqlServername MyDBName > backup.sql

Note that while many resources will tell you to include you password in the above command by replacing -p with -pMySqlSecretPassword, this is a security risk on any system with more than one user. Don’t do it. Instead, just use -p, and mysqldump will prompt you for your password. The resulting backup.sql is a sql script that you can feed directly to mysql, which will recreate your entire database, data and all. Very nice.

So, precautions properly taken, I asked the One-Click installer to upgrade me. A couple of minutes later, I got an email telling me that my upgrade was successful, and instructing me to follow a link to a special page in my site’s Admin area that would complete the upgrade by updating my database structure. Which is when things took a turn for the worse.

The update database page would not load. The admin login screen would not load. The blog would not load. Half a dimension away, Murphy giggled maniacally as he enforced his Law. Jerk.

The error message indicated that one of my plugins was attempting to redefine a function already defined in one of the core WordPress files. Oops. I’ll just skip ahead here to something I learned after some quality time on The Google: It is recommended that you disable all plugins before upgrading from a pre-2.5 install to 2.5.x. Oops. Annoyingly (but perhaps predictably), the only way to disable a plugin is via the Admin interface. You know, the one that didn’t load. Oops.

Fast-forwards 20 minutes of increasingly irritated Googling, and I had learned that there is an entry in the MySql table wp_options named active_plugins (i.e., where option_name = 'active_plugins'). If you set the option_value field of this row to an empty string, all plugins are disabled. That was enough to let me access the Update Database page, complete the upgrade, and use the Admin interface.

Of course, the blog was still broken, because my theme templates rely on certain functions exposed by various plugins. I proceeded to turn on plugins one at a time, based on the error messages I saw, until things were working. The only problem I ran into was UltimateTagWarrior, which is no longer supported, as of WordPress 2.3. Shutup, Murphy.

The solution was not difficult, although it required a little more Googling than I expected. UTW was discontinued because WP got built-in tagging support in WP 2.3 (I believe). However, anyone who used UTW had theme templates containing calls to UTW-specific functions. In addition, UTW offered a number of tag display options not offered by the core WP install. So the plugin’s author Christine introduced a new plugin, UTW Theme Compatibility Thing, which offers all of the old UTW template functions, but uses WP’s native tagging system as the data source. Once I installed and activated that, everything worked, except that I had no tags on my posts. (Note: If you used icons with your tags, as I do, be sure to check the instructions on the Compatibility Thing wab page or the readme file; there are a couple of extra steps required to make them work.)

This turned out to be an easy fix as well, after more time on The Google. WordPress already includes a tool to convert UTW tags to WP tags. From the Manage tab of the Dashboard, choose Import, and then choose Ultimate Tag Warrior. Five clicks through the wizard later, and you’re all done.

As far as I can tell, everything is working now. If you have any problems using the site, or see anything funny, please drop me an email or a comment.

So far, I really like the new WordPress, and I’m looking forward to trying out the new image uploader and the Gallery. My only complaint so far is that the page preview has been moved out of the Write Post page; you now click to pop open a preview. Do not want. I’ll give it a couple of days to grow on me, and them I’m going to start looking for a plugin to add integrated preview to the Write page.

Both comments and pings are currently closed.

One Response to “Upgrading to WordPress 2.5.1”

  1. effika Says:

    I think they introduced the popped up preview with 2.1, but there was a very small wp hack to get it to show the preview in-page since at that point they hadn’t taken the code out.

    Maybe that was the vague hacked up configuration that was gnawing at you?

    The preview function annoys me as well, so perhaps I’ll see if they’ve left the old code in with this newer release…