WordPress Upgrade Tips

MIHMORANDUM NO. 92 | May 22nd, 2008Reader Comments (5)

As many of you know, I heart WordPress. It’s robust, phenomenally easy to customize, and with all of the contributions from the open-source community, “tech support” is never hard to come by. With a few tweaks to the default settings, it’s also quite SEO-friendly. Perhaps best of all, it’s so easy for clients to use that I’ve started building a number of sites completely using WordPress as a content management system.

One of the few downsides to the platform is the cumber-some-ness (how’s that for onomatopoeia?) of upgrading to the latest version. Matt Mullenweg et al just released WordPress 2.5.1 a few weeks ago, and upgrading is something I highly recommend that everyone do based on some recent spam injections I received on my own blog, which ran the previous version. I know there are a few automatic WordPress upgrade plugins out there, but I’m hesitant to automate a process that seems to vary by server and by client.

So after upgrading about nine instances of WordPress in the last week, here are a few tips I’d recommend to folks (lots of these are in the official upgrade instructions, but bear repeating):

1) Absolutely make a backup copy of your database and all of the folders in your WordPress directory. Note: you can easily export your WordPress mySQL database using phpMyAdmin, assuming your webhost has that installed. Even if you don’t think you’ve made any tweaks to core WordPress files, it’s still a good idea to download all of them from your server into a local folder on your computer using FTP.

2) Disable all plugins before removing/changing any files on your server. Note: If you forget to do this, and it looks like your blog has broken after the upgrade, you CAN safely remove these from the plugins folder via FTP and it will have the same effect.

2a) Note: if you are on a Rackspace server (a terrific company btw; I highly recommend them if you can afford their pricetag), you may have to physically remove all plugins from your wp-content/plugins folder, and then re-upload them after the upgrade process is complete. The admin panel may not load otherwise.

3) DO NOT TOUCH YOUR “wp-content” FOLDER AT ALL DURING THE UPGRADE PROCESS. TAKE SPECIAL CARE NOT TO OVERWRITE IT WHEN UPLOADING NEW FILES. The reason is that any customizations you made to your theme, be it “default,” or a custom theme that you downloaded, will be overwritten & your blog will look completely different. There’s nothing in there that you need to change anyway.

4) If you’re upgrading from version 2.3 or earlier, you might see some funky characters in your posts like ’. These are simply mis-interpretations of apostrophes and quotation marks. They come from a new line in the wp-config.php file that specifies a charset. YOU DON’T HAVE TO GO IN AND EDIT YOUR POSTS (which I started doing before I found the solution).

In your wp-config file, find the lines:

define(’DB_CHARSET’, ‘utf8′);
define(’DB_COLLATE’, ”);

Just change the first one to

define(’DB_CHARSET’, ‘′);

And those weird characters should go away :)

Anyone else have WordPress upgrade experiences they’d like to share?

5 Responses to “WordPress Upgrade Tips”

  1. David McDonald says at

    Hi David,

    Another way to upgrade WordPress is by using SVN. The Codex shows how to install and upgrade with SVN but it does require shell access to your account. It’s a little involved to set up, but once done upgrades are as simple as one shell command and take about 5 seconds.

  2. David Mihm says at

    Thanks for that tip, David. I’ll look into that when 2.6.1 comes out :) Will probably try on my own blog first before my clients :)

  3. Will Scott says at

    David,

    Just a note to say I used the automatic upgrade and it worked brilliantly.

    Will

  4. Ready Set Connect says at

    Make sure to always backup your database and previous installation just incase you cant get the upgrade to work. If your database ‘breaks’ after the installation, try using the database repair tool located in phpmyadmin. that seems to fix it

  5. Steve Wamsley says at

    Excellent, helpful post. Thank you for putting this info up. I’m working through upgrading a number of WP sites and this post helped me with some of the more obscure stuff like the character encoding. Thanks again.

Leave a Reply

You are here: Home > Blog > WordPress Upgrade Tips