Keeping your WordPress current…
One of the many advantages of using WordPress is that you don’t have to hire someone to design, implement and maintain your blog on a regular basis. At the same time this can be a disadvantage when the time comes to upgrade your WordPress installation for any number of reasons. Such as security concerns or wanting to using one or several of the new features added.
This task can range from straight forward and taking only a few minutes to complete to being extremely complex requiring a great deal of expertise, planning and execution. Our general recommendation is if you aren’t exactly sure where your blog lies within this range it’s best not to attempt upgrading WordPress yourself. You can instantly “break” your blog so visitors won’t be able to access it and with a little more effort corrupt or destroy all of the data that makes up your blog including its posts and pages.
How does one know what will be involved in the upgrade process? There are four major factors to address along with the possibility of numerous minor ones based on your individual blog. We will discuss the big four as in most cases these will cover the typical installation.
Your theme – Is your theme supported in the latest version of WordPress?
WordPress continues to grow and as this growth occurs new features are added and existing features are dropped or replaced. This means your current theme might not function correctly or at all. Usually you can check with the theme’s author and they will let you know which versions of WordPress are supported. If your theme isn’t supported or you can’t find out whether it is or isn’t keep in mind you may have to switch to another theme upon upgrading.
Customization – Have you or someone modified the WordPress scripts or data files?
Of course the wp-config.php file needs to be modified to reflect your installation but if other WordPress files have been modified more than likely these changes will be overwritten during the upgrade process. As above this can leave your blog non-functional or at a minimum alter how it appears. Your only option is to reapply these modifications to the version you will be upgrading to or switching to a new supported theme which will hopefully make the previous changes obsolete.
Plugins and Widgets – Are they supported in the latest version of WordPress?
Since both of these interact with WordPress’ scripts you need to ensure they will continue to function once you have upgraded. As with themes you should be able to check with their author’s to see if they are supported. If not, you will have to look for a suitable replacement or perhaps utilize one or more of WordPress’ new features to perform the same (or even better) function.
If you have made it this far and you are still fearless we will jump to the actual process of upgrading. The first required step is one you should be doing all along. This is backing up your blog installation so no matter what happens you will be able to go home again. We can’t stress enough how important this step as it is the only one which ensures you’ll eventually end up with a fully working blog. We covered this process in a previous post and don’t even think of proceeding until you have followed all of its recommendations.
During the upgrade process your blog will be non-functional and if any unexpected issues arise it may be offline for a considerable amount of time. So keep this in mind before you begin the process. Also take into account each WordPress installation is unique and as such these steps may or may not be successful for your blog.
1. Backup everything as outlined in the above link.
2. Deactivate all plugins.
3. Upgrade all plugins required to be compatible with the latest release of WordPress.
4. Create a top_level_old directory under your blog’s top directory.
5. Copy all of the files in the blog’s top directory to the top_level_old directory (not directories).
6. Delete all files in the blog’s top directory except for wp_config.php, .htaccess, and robots.txt (not directories).
7. Rename the wp-admin directory to wp-admin_old.
8. Rename the wp-include directory to wp-include_old.
9. Rename wp-contentthemesdefault to default_old and wp-contentthemesclassic to classic_old.
10. Delete wp-contentcache and wp-contentpluginswidgets directories (only found on older releases).
11. Copy the latest release files and directories to the top level directory of your blog.
12. When prompted to overwrite files or directories answer Yes.
13. Log into your admin account via /wp-admin. If prompted allow WordPress to upgrade your database.
14. Reactivate your Plugins.
15. Check your blog out thoroughly!
If for some reason your blog isn’t functioning and you want to return it to its original state follow these steps.
1. Delete all of the files in your blog’s top level directory (not directories).
2. Copy all of the files from the top_level_old to the top level directory.
3. Delete the wp-admin and wp-include directories.
4. Rename wp-admin_old to wp-admin and wp-include_old to wp-include.
5. Rename wp-contentthemesdefault_old to default_old and wp-contentthemesclassic_old to classic.
If you are on a very early version of WordPress you may need to do the following.
1. Restore the wp-contentcache and or wp-contentpluginswidgets directories.
If your database was upgraded during the process or you upgraded Plugins that now aren’t compatible with your older version you will have to take further actions to return your blog back to its original state. To restore Plugins back to their earlier versions do the following.
1. Delete wp-contentplugins.
2. Restore the wp-contentsplugins directory or reinstall the older versions of each Plugin.
If your database has been altered during the upgrade process to the point it will no longer work after returning your blog to its original state you should contact your hosting company as they can help in recreating a compatible database. Once created you can restore the data using the xml backup file.
To recap upgrading can take from ten minutes to unknown amounts of effort and time. So it’s best to proceed with caution and even if you aren’t interested in upgrading WordPress yourself it’s still helpful to have a better understanding of the process. Further information is available here.