Manual Upgrade of WordPress 1


It has happened a few times to me.  The automatic upgrade plugin for WordPress hasn’t worked.  The last time this happened was with WordPress release 2.6.1. and it happened on all of my blogs.  Is it a hosting issue, or a plugin issue?  I am not sure, but what I am sure about is that I need to upgrade manually.  It’s one of those scary things the first time you have to do it, because you’re not too sure whether your site will still be functioning at the end of it all.  However, after having completed the procedure several times, I wanted to show you how easy it really is.

NOTE: Since writing this tutorial, I have found that manually deactivating all plugins (except the automatic upgrade plugin) before starting the automatic upgrade procedure fixed the problem with the upgrade failing.

The first sign that you need to upgrade will be in your WordPress Dashboard.

needtoupgrade

You can see the Automatic Upgrade plugin kicking in, however, after trying this, it didn’t work.  Here is how to manually upgrade WordPress to 2.6.1.

NOTE: Backup everything before you try this, and I accept no responsibility if things go wrong.  If you try this, you try it at your own risk.

1. Download WordPress 2.6.1.

2. Backup your database.  If you have the Lester Chan’s excellent WP-DB Manager plugin activated, backing up is very easy.

3. Backup all of your WordPress files for the existing installation.

4. Deactivate ALL plugins.

5. You need to delete the old WordPress installation, but there are some files/folders you do not delete.

Do not delete:

  • wp-config.php
  • wp-content folder, but you do delete the wp-content/cache and the wp-content/plugins/widgets folders.
  • wp-images folder;
  • wp-includes/languages/ folder if it exists
  • .htaccess file
  • robots.txt file

Delete:

  • wp-admin folder
  • wp-includes folder (but not the “wp-includes/languages/” folder if it exists).

NOTE: I actually don’t delete these, but simply over-write them.  I have not had a problem doing this instead.


6. Open the wp-config-sample.php file that comes with the latest version of WordPress in a text editor.

Open up your old wp-config.php file, and enter your old MySQL Settings AND the table prefix into the new wp-config-sample.php file.  NOTE: This step is not in the online upgrade page at WordPress.org, but it is a necessary one since in 2.6.1. the wp-config.php file has some additional lines for security keys:

wp-security-config




Get your authorisation keys for lines 13, 14 & 15 of the wp-config-sample.php file from http://api.wordpress.org/secret-key/1.1/.  That link will give you three lines that you can copy and paste over the top of the existing lines in the sample file.

7. When you are 100% sure that your database settings and table prefix are correct in the sample file, rename the newly edited wp-config-sample.php as wp-config.php.

8. Upload the new version of WordPress Files.

9. Run the upgrade program by typing in http://mydomain.com/blog/wp-admin/upgrade.php

NOTE: Replace the “mydomain.com/blog” part with the location of your WordPress installation.

You’ll see this screen:

upgradewpdatabase

Click the Upgrade WordPress Button, and hopefully you will see:

wp-upgrade-complete

Click the continue button and you should be taken to your blog.

Logging into your blog Dashboard should now show that you are using the latest version.

wp-upgrade-complete2[5]

10. At this point, you need to reactivate the plugins, and update any that may not be compatible with the new version of WordPress.  However, the official updates instructions say to update permalink structure and htaccess files, so maybe this is necessary if you actually delete the files and folders above (instead of over-writing them as I do).

Be aware that although I have not had any problems using my “over-writing” process rather than deleting and re-uploading, there is no guarantee that this procedure will always work.


You may see this message:

wp-cleanup

This message comes from the WordPress Automatic Upgrade plugin.
Click the link to clean up and remove the nag.  You’ll then see:

wp-cleanup-successful


You should now be good to go.  Happy blogging!


Leave a comment

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

One thought on “Manual Upgrade of WordPress

  • Ed Smith

    Thanks for these instructions. I was getting the WSOD and nothing I tried solved the problem. As soon as I untarred my backup, the problem went away. When I followed your instructions, I disabled the plugins BEFORE upgrading, and I think this is what did the trick.

    Note that I did not have to mess with permalinks after the upgrade, and the database itself did not need upgrading either. Everything seems to be working fine.

    Thanks again.