Upgrading WordPress 2.2 to 2.3

UPDATE: The latest versions of WordPress (as of 12 July 2009) all have upgrading options in the administration panel. So you only need to backup your database, click that upgrade link/button in the admin panel, and that’s it. Just go get the latest version, and save yourself the hassle.

So WordPress version 2.3 was released on 24th September 2007. The question is, do you upgrade?

I’m just getting comfortable with WordPress, and then they announce a major upgrade release. As I see it, there are 4 types of people: bleeding-edgers, early adopters, late adopters and the non-budgers. I usually hover between the first two groups. In the case of WordPress, my procrastination could be summed up in one word: laziness.

I’ve been thinking of upgrading for a while already, so finally, one sunny Sunday morning, I went through the whole upgrading process. Here’s what I did (following instructions from the WordPress upgrade page):

1. Backup my database

This one’s easy. The backup instructions provided by WordPress are easy to follow, and there are pictures. Can’t see how anyone can fumble on this.

2. Backup my files

WordPress suggests that I backup all the WordPress files. I thought that since I’m backing up stuff, I might as well go the whole nine yards and backup everything. So I downloaded my entire site onto my computer.

Luckily I’ve got SmartFTP to help me out. I set the download in progress and went for tea. Seriously. The download is gonna take a while…

I also did an export of the posts from within the WordPress panel into the .xml file. Just in case.

3. Verify the backups

Ok, verified the SQL statements are correctly formed in the backup file. I’ve got the entire site on my computer. Moving on…

4. Downloaded all the upgraded plugins

Starting to veer away from the instructions given by WordPress. My reasoning is that I want the upgrade process to happen so fast that even Superman won’t notice any site downtime. So I want everything that can be done without involving the site to be done. This include any downloading of plugin updates.

I’ve got these plugins:

I was able to find updates for all the plugins except Ultimate Tag Warrior, SEO Title Tag and Subscribe to Comments. Well, version 2.3 has in-built tagging capabilities, and I found UTW to be a bit intimidating when I set it up. I don’t need that much flexibility anyway, so UTW is dropped out. It was one of the major reasons why I wanted to upgrade in the first place, for the native tagging capability.

As of this writing, Netconcepts announced a working version of SEO Title Tag for WordPress 2.3 by 31 October. Well, I’m already in the mood for upgrading, so I’ll upgrade later. From what I found, there’s only minimal incompatibilities. Official word from WordPress compatibility results shows that “Primary function is fine but returns a fatal error when tag pages are accessed.” Hmm… oh whatever, so I just went ahead and installed what Netconcepts had first.

As for Subscribe to Comments… no news from Mark, and I made a decision and dropped the plugin. It hasn’t been of frequent use, so it’s not too bad.

5. Downloaded and extracted the WordPress 2.3 package

Same reasoning as above. I mean, what if my Internet connection went limp? You mean I deactivated my plugins, and my site’s sitting there incomplete, and I’m here waiting for my download to complete? No, no, no…

So I downloaded the package first, and extracted everything.

Got a bonus. The stable release is version 2.3.1, so I got something extra. Hope 2.3.2 is a bit further in the future…

6. Deactivate plugins

Now I deactivate the plugins. I was going down the line and when I reached the bottom, I noticed there’s a “Deactivate All Plugins” link provided. Stupid me. Oh well, I didn’t have a lot of plugins anyway…

7. Ensure necessary steps are done

I didn’t follow the WordPress instructions as given. But the idea was to make sure database backup was done (and usable), file backup was done (and usable) and plugins deactivated. Checked.

8. Delete old WordPress files

This one I followed to the letter. I don’t mess around with stuff I don’t fully know or understand. I did make one mistake. I deleted the wp-config.php file. Aahhh! I didn’t realise it until I couldn’t do the upgrade process. More on this later…

9. Upload the new WordPress files

SmartFTP saved the day again. A few clicks and everything’s on their merry way. I went to get another cup of tea…

10. Run the WordPress upgrade program

Basically, you fire up your favourite browser, and type http://example.com/wp-admin/upgrade.php into the address bar (assuming example.com is your site). Or http://example.com/blog/wp-admin/upgrade.php if you installed on a subdirectory “blog” when you first installed WordPress.

This was the point where I realised I couldn’t upgrade because I was missing the wp-config.php file, which I was supposed to leave alone. Luckily, I made a full backup. See how useful that was? Whew… I uploaded the wp-config.php from my backup, and ran the upgrade program again. It worked like a charm!

11. Update Permalinks and .htaccess

Nothing to do really. But I clicked the update button anyway.

12. Installed updated plugins

I uploaded all the updated plugin .php files, and reactivated them. Except for Ultimate Tag Warrior. I went through all the plugins and saved the settings. Particularly the Google Sitemap Generator, since I’ve got to rebuild the sitemap.

13. Checked that site is working

Failed. Because I was using an Ultimate Tag Warrior function for displaying tags. Ok, deleting from my .php files. Site restored, sans tags.

14. Import Ultimate Tag Warrior tags to WordPress

This turned out to be easier than I thought. Look at Technical Itch and Rich’s two part article for more information. Simply go to the WordPress control panel, select [Manage], then [Import], then scroll down to find the Ultimate Tag Warrior link.

Click to enlarge screenshot.
Managing Ultimate Tag Warrior import in WordPress
There are 3 steps to the whole thing, although it’s stated there are 5. Maybe it depends on the blog structure. No radio buttons. No check boxes. No typing. Just keep clicking on the [Next] button…

Now to display the tags. Use this format

<?php the_tags('before', 'separator', 'after'); ?>

Cryptic. What before represents is the text before the tags, separator represents the text between tags, and after represents text after the chunk of tags. An example explains this better:

<?php the_tags('Internal tags : ', ' | ', ''); ?>

Which gives something like

Internal tags :  polymath | code | upgrade

Theoretically (I haven’t tried this), you can set it to be

Internal tags: <?php the_tags('<ul><li>', '</li><li>', '</li></ul>'); ?>

to get

Internal tags: <ul><li>polymath</li><li>code</li><li>upgrade</li></ul>

This gives you some flexibility with CSS for a more customised display.

Anyway, that chunk of php code was added into my index.php and single.php, just after the post content. Uploaded the two files and rechecked blog. Yay! We’ve got tags!

One small note: The imported tags have a dash in between words. So if the original UTW tag is “original tag”, it’s displayed as “original-tag”. The original UTW tags are stored with a dash anyway (you should have noticed it when you save your drafts with tags).

It’s not a big deal. Perhaps when I’m in the mood, I might go into the database and flex my SQL powers to do update statements. Right now, I’m just glad everything went smoothly.

15. Write a post

This one’s not in the official upgrade guide. What good is an upgrade if you can’t use it, right? So I went ahead to write up a new post. You’re reading it!

I came across a problem I’ve never come across before. I can’t save my post. What!? After all that hard work, I can’t save a post? Then I checked my post length, which isn’t much longer than usual. I deleted some text and tried. It went through.

Hmm… I added some text and it failed with a 404. The threshold seems to be about 4000 characters, but I don’t think that’s the problem. I did some searching and found this solution about saving with an “Error 404”. Simply add

SecFilterEngine Off
SecFilterScanPOST Off

to your .htaccess file (located at the root of your blog). Problem solved.

[Update] If you still have a problem, try placing the two lines within an IfModule tag, like so

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off


I have successfully upgraded my blog from WordPress 2.2 to 2.3. The entire process took about 3 hours, with the better part of it used on downloading and uploading stuff. Actual manual interaction was much less. I drank tea and dozed lightly in front of the computer most of the time, keeping tabs on the whole process.

I’m so proud of myself. Since it’s hard to pat myself on my back with my hands, I’m going to go get myself a cup of tea instead…

Tell me about your experience with upgrading in your comments!

  1. Dean @ Technical Itch

    Glad your update went smoothly. I too like to take full backups of my entire site onto my local computer. I like to make sure I have as much backed up should things go wrong.

    Thanks for linking to my site too.

  2. Vincent Tan

    Disk space is quite affordable nowadays, so backups should be a must.

    I was actually wondering if I had to do some digging into WordPress documentation and see if I could transfer UTW tags into native format. I’m so glad I found your article.

Comments are closed.