How to Upgrade WordPress With Minimal Fuss

By | January 22, 2009

Upgrading WordPress is supposed to be an easy job, but many people get it wrong and end up with problems that are not apparent until after they upgraded. Even though WordPress upgrades can now be done automatically from the WordPress admin just like you do with plugins, there still remains many who haven’t upgraded to the latest version. No estimates exist, but I bet there are many WordPress sites out there lagging far behind.

I’m writing this guide for those of you who haven’t upgraded in a while, and hopefully it’ll be helpful if you need to manually upgrade, and want to avoid posting a frantic “please help me” thread at the WordPress forums. It’s really easy, but people keep messing it up, and that’s why there are so many problematic WordPress upgrades (or so I notice).

1) Preparation. The best way to upgrade WordPress manually is to prepare everything before you do anything else. So back up everything by going to Backup in your hosting panel, and just backup 2 things – Your database and your files (Do a full site backup). Unzip them, and make sure they are all fully workable.

The backup icon on cPanel

The Backup icon in cPanel

2) Create extra public html directories. You will be switching the database to point to a new index directory shortly. This method helps a lot if you’re upgrading through multiple versions of WordPress and need to do it in stages, like if you’re upgrading from WP 2.1 to WP 2.7. You’ll need to do an upgrade to WP 2.3 and then WP 2.5, and finally WP 2.7. Never do large upgrades in one leap; it will mess up your database!

In the example below, I’m using Filezilla as the FTP client. Let’s say you are upgrading from WordPress 2.3 to WordPress 2.7. Right click and create 2 new public_html directories and name them public_html2.5 and public_html2.7 (just examples). We’re assuming that we are upgrading to WordPress 2.5 and then WordPress 2.7.

Create extra index directories using your FTP client

Create extra index directories using your FTP client

3) Upload all WordPress 2.5 files into public_html2.5, with the exception of wp-content. I assume you have a full backup copy of the site files. Upload the wp-content folder that you earlier downloaded, into public_html2.5 along with the htaccess file, sitemap files, the wp-config file, and anything else that are specific to the original public_html directory. What you now have is a fully working index directory that after renaming, will function as your index directory.

4) Repeat step 3 for the public_html2.7 directory but for this one, upload the WordPress 2.7 files into it, and repeat everything in step 3. Just leave out the wp-config file though. You’ll upload the wp-config file in step 5 below.

4) Log into your WordPress backend and deactivate all plugins, and switch your theme to the default, stable Kubrick theme (to avoid any problems). At the same time, in your FTP client, change the name of the current, old public_html directory into something else. And then rename public_html2.5 into public_html. Have your browser window open and with the URL www.your-site.com/wp-admin/upgrade.php keyed in. The upgrade screen will appear, telling you your database needs to be upgraded; just click on the Upgrade button. Your database will then be upgraded from WordPress 2.3 into WordPress 2.7.

The "Upgrade WordPress Database" screen

The "Upgrade WordPress Database" screen

5) After upgrading, download via FTP the wp-config file from the new public_html directory (with the newer WordPress version), and then upload it into public_html2.7. I just take this step as a precaution to ensure that whatever changes done on the wp-config file by newer versions of WordPress will also be maintained. Then, repeat step 4 by renaming public_html2.7 into public_html, and changing the current one’s name into something else. Then go to the WordPress upgrade url (http://yoursite.com/wp-admin/upgrade.php), and upgrade the database again to WordPress 2.7. You should encounter no problems if you did everything right.

6) That’s about it. Log into your site and switch on the Maintenance Mode plugin (a useful plugin), and then activate all your former plugins or upgrade them if necessary. Switch back your old theme, and make whatever changes you need. The real upgrade process only takes a few minutes, if you did all the preparations beforehand. Don’t forget to deactivate the Maintenance Mode plugin afterwards.

Finally, log into your hosting control panel, and delete all the old index directories which you renamed earlier. They contain the older WordPress versions and you won’t need them anymore. Also, don’t forget to check your folder and file permissions and make sure they are secure and accessible. For example, your wp-content/uploads folder should either be 755 or 777, depending on your webhost’s server settings; otherwise you won’t be able to upload images.

This method of upgrading WordPress is fast and seamless, and I hope this was helpful to anyone who needs to do manual upgrades spanning several WordPress versions. Remember to ensure all your FTP uploads are smooth; many post-upgrade WordPress problems stem from files getting corrupted during the FTP process. Creating extra index directores and switching the database as necessary, you can smoothly upgrade WordPress over 3 or more versions within 20 minutes or less.

Spread the love