How should I upgrade WordPress?

I’ve heard that it’s a good idea to upgrade my blog to the latest version of WordPress. How do I do this?

Keeping your blog software up to date is pretty important. New software exploits are discovered every day and running an older version of a well-known can expose you to an unacceptable level of risk. Blog software is no exception to this rule and you should always keep up to date with the latest releases.

Step 1 – Download the new version of WordPress

The first step is to download the most recent version of WordPress. Unzip this into a folder, all ready to update your website. However, before you upload it, there are a few important steps to take to make sure you don’t jeopardize your blog.

Step 2 – Backup your blog

Before you do anything, it’s always a good idea to backup your website to make sure you have a fallback position should everything go wrong. Backing up WordPress is a 2 stage process. First you need to back up your database using the Backup plugin that ship with WordPress. This even give you the option of sending you an email with a backup of your database. Remember to backup all your tables, not just the wordPress ones. The second step is to backup all your customisations and plugins. I personally take a backup of all the files on the server, so that I can restore the site quickly should the need arise.

Step 3 – Deactivate all your plugins

Some plugins change the way WordPress work, and some will not work with the new version of WordPress, so it’s terribly important that you deactivate them all before you start the upgrade process.

Step 4 – Upload the new version

You can now upload the new version which you had downloaded before starting the entire process. In most cases it’s perfectly acceptable to just overwrite everything with the new version. If there’s any exceptions to this (like deleting files before performing the upgrade), these are usually outlined in the upgrade notes.

Step 5 – Run the upgrade program

If you try accessing your website now, you will get an error messaging stating that the website is out-of-sync with your database and give you the option to upgrade your website. Go ahead and select this option. WordPress will proceed to upgrade itself to the new version

Step 6 – Enable your plugins

This is the tricky part. Sometimes plugins will not work properly with the new version of WordPress, and this may require that you modify your template to match. Start enabling your plugins one by one, confirming that your blog still works with each one you enable.

So, what do you do if it all goes wrong. If this happens, you’ll need to restore files from your backup, or even make use of your MySQL backup. I’ve done a number of upgrades so far though, and never needed to return back to backups. Good luck!

11 thoughts on “How should I upgrade WordPress?”

  1. [cough] Fantastico[cough]

    Seriously, some nice concise instructions there Owen, if your host doesn’t offer Fantastico ๐Ÿ™‚

    Technorati hasn’t updated this blog in 2 months for some reason.

  2. Hi Owen. I am commenting on each Postie Blog that is listed on the Linky List. I have a sidebar widget that many people have decided to put on their blogs. In return I link to your blog under my Photo-A-Day Hosts Blog Roll.

    What is the widget. Well, it is a daily photo from my Photo-A-Day project. I have been taking and posting photos to my blog for 2 years straight. I just started year 3. Iรขโ‚ฌโ„ขd like to get more people viewing the images and commenting on them so if I can get many Photo-A-Day hosts then I hope I can get people viewing my photos and leaving comments.

    You can add Photo-A-Day to your blog and contact me letting me know the widget it up and I will add you to my PAD Host link list.

    Here is the link to the Photo-A-Day instructions and code.

  3. I just use ‘one click installation’ at dreamhost. I do deactivate plugins before running, but it always works like a charm for me.

  4. Make sure you backup your blog so you don’t ruin it. This includes the database it’s stored in. Usually you’ll have to access the myphpadmin application on your website and it’s real simple to back it up. WordPress should have a step by step guide on their website.

    Be careful, lol, I really ruined my blog the first time I tried to upgrade. Didn’t work out so well, finally was able it upgrade it the second time and slowly recovered all my posts and comments and what not. Crazy.

  5. Returning to this post via RT’s drive by, can I be Mr Pedant, and say that you do not need to delete the wp-content directory, especially if you have in any way amended your themes.

    Don’t delete the wp-config file either.

    You haven’t upgraded to 2.1.3

    I’ll shut up now ๐Ÿ˜‰

  6. Thanks Chris

    You’re right, of course. You can leave those bits behind.

    Also, I’m waiting for the next drop to upgrade ๐Ÿ˜‰

  7. For some reason when I did my upgrade on one site this week when I was uploading the new files to the server (just overwriting the old) it kept failing. Once I cleaned off the server then uploaded all went well. I am not sure what caused the trouble, and luckliy it was only a minor annoyance.

  8. nice tutorial, especialy for newbie.
    by the way, is there any adsense plugin for wordpress?

    I have several blog in wordpress, and always do manualy in adsense script

  9. Nice article. Very useful.
    I’d add a step after backing up: Test Back UP.
    It happens that you forget to backup something or your backup get corrupted. In a very big production enviroment, I’d get the site running completely on other server from my backups (to make me sure that they are OK) and then procede to upgrade.



  10. Dumb ! I wonder if I have read this instruction before , I just not deactivated my plug-ins . But anyways I bookmarked this instructions for future ref. good work Owen ! Hats-off

    – Mac , Photo Artist

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.