Themes, plugins, and WordPress updates: they’re necessary to keep your site secure. But unless you use your WordPress theme straight out of the box with no customization, enhancements, or modifications, you are at risk of breaking your site whenever you update.
This post will explain updating a WordPress site and practical strategies you need to know. You will learn a systematic, step-by-step approach to take when updating a WordPress site.
Maybe fear of breaking your site has kept you from updating. And if you haven’t kept your WordPress site up-to-date, site performance may suffer and your site is at greater risk of getting hacked.
Generally, a site that isn’t kept updated usually will need its plugins and theme updated as well as WordPress itself. And on very old sites sometimes the MySQL database is outdated and will need to be upgraded, too.
And remember: never update a live site without first testing the update on a test server. We’ll talk about how to do that in just a bit.
Updating a WordPress Site
Remember that the official site for all things WordPress can be found in the WordPress Codex.
WordPress Codex is an online manual with official information and documentation for WordPress. While there are lots of great articles and tutorials about WordPress all over the web, rest assured that your best source of accurate information is in the Codex. It is here you will also find best practice recommendations for the use of WordPress.
The Codex is also where you can find extended instructions for updating WordPress. If your site is behind more than two major releases, it is recommended to upgrade incrementally. Skipping one release is okay, but you should never skip two releases when upgrading.
You can find older versions of WordPress in the release archive at WordPress.org. Keep in mind that NONE of the old releases are safe to use. Only the latest release is actively maintained. So follow the detailed instructions for upgrading WordPress, but make sure you do these steps on a test or development version of your site.
So now that you have an understanding of best practices for updating a WordPress site, let’s look at how you can accomplish updating a WordPress site using practical and safe strategies.
Create a Backup Before You Start
First things first! Make sure that you have a working backup of your live site before you do anything. By working backup, I mean make sure you have created a backup of your site and tested that backup to make sure it’s good.
If you have a good backup, then proceed.
If you are only one version behind the current WordPress release, you should be safe to update WordPress. But it’s always a good idea to wait at least one week after an update to WordPress is released before updating WordPress on your website. Generally early release bugs are shaken out within a week, and it’s safe to update.
If you are two or more versions behind the current WordPress release, you should follow the Codex instructions for incremental upgrades. However, once you set up your test environment, you can test upgrading to the current release even if it spans multiple releases. If it works without breaking anything, you should be good to go.
You’ll most likely find that after a WordPress release comes out, themes and plugins might need to be updated as well.
Put Your Site into Maintenance Mode
If your site gets a lot of traffic, you’ll want to put your website into maintenance mode.
Updating a Plugin
First, consider installing the WP-Rolllback plugin on your site. It’s a safety net that will allow you to roll back a plugin or theme to a prior version in the event of a plugin update fail. It’s a good idea to test WP-Rollback on a staging or test server first to make sure there is no loss of data and that the rollback works as expected.
If your site is current with the latest WordPress release and you have a plugin that needs updating, you should be able to safely just update the plugin. But first make sure to check the plugin for WP version compatibility.
If your plugin has not been tested with the current version of WordPress, it might be worthwhile to hold off on updating that plugin.
Otherwise, update the plugin. If the plugin update fails, clear the cache and open up your site in a new browser window to make sure the site is not broken. If your site is broken, log into your website via FTP or cPanel and rename the folder of the broken plugin. Then try to launch your site again. It should be okay at this point.
You can then try to install a fresh copy of the plugin.
If that still fails, you have 2 choices:
- If the plugin is critical to the functionality of your website, contact the plugin author. Restore the backup.
- If the plugin is not critical to the functionality of your website, delete it altogether.
At this point it might be a good idea to find another plugin that has been tested with your current version of WordPress.
Updating a Theme
I encourage you to closely monitor the support forums for feedback from early adopters of a theme update. That is, some users are trigger-happy and update a theme the minute they see the notice in the WordPress dashboard. You’ll only make that mistake ONCE.
Do NOT – I repeat – do NOT be the first to jump on the update bandwagon when you see a theme update notification.
Instead, take a watch and wait stance. Lurk around the support forums and learn from others’ experiences. See what issues they have run into and what impact they might have on your site.
I would advise against updating a theme on a live site. Regardless of whether it’s a premium or free theme, you should test it on a development version of your site.
Even if you’ve used a child theme to customize your site, there is a good chance that your site might need some tweaking once the theme has been updated. This is because some of the theme core files (such as functions.php or header.php) might have changed significantly and you’ll need to recreate those child theme files.
In my experience, WordPress themes with visual editors seem to have the greatest risk of problems during updates.
Divi Theme Upgrade Example
For example, several years ago a major upgrade release of the popular Divi theme created a lot of work for WordPress users who had customized their sites. In fact, the Divi support forum had a downgrade path for users whose sites broke upon updating the theme. The downgrade path gave them a chance to revert back to the prior theme version and restore their sites.
Additionally, the popular Divi Children plugin needed some major work to provide backward compatibility for older sites.
All this to say, it was important to know this ahead of time to come up with an upgrade strategy. That included moving each client site to a test site to upgrade then fix the problems that resulted from the upgrade.
The remainder of this post shows several ways you can create a development server or test site.
Create a Test Installation of Your Live WordPress Site
There are several ways to set up a test or development installation of your WordPress site.
It might seem overwhelming to take the time to do this, but it’s well worth the time and effort to create a development site in which to test plugin, theme, and WordPress updates.
First, you need to decide whether you want to create a local copy of the site. That is, do you want to download the entire website to your desktop PC? If so, you need to set up a server and the type of server depends on which operating system you are using: Windows or Mac?
Setting Up a Local Version of Your WordPress Site
Since I’m a Windows user, I’ve used XAMPP, Instant WordPress, or UpdraftPlus to create a local version of a live WordPress site.
I used to have the premium version of Backup Buddy, but had trouble getting backups to complete on most servers. I since switched to UpdraftPlus (affiliate) and have been very happy with the plugin’s reliability. It just works!
Take a look at these options and decide which is the best solution for you:
7. Use UpdraftClone to clone your site to the cloud. This is hands down the easiest way to copy and test updates!
Otherwise, you might want to set up an online test site.
Setting Up an Online Development Version of Your WordPress Site
Many times customers want to monitor progress or you’ll need them to test their site once it’s upgraded. Putting a copy of the site on their server makes good sense in cases like this.
I use UpdraftPlus Migrator (aff) to migrate larger sites.
Done Testing – Now What?
So you’ve done your work and your test site is upgraded and stable.
How does that translate to the live site?
You have several options depending on the amount of work you had to do.
- Put the live site in maintenance mode and repeat the steps you did when testing.
- Make a copy of the test site and move it over to the live site using a tool such as UpdraftPlus Migrator. If you do this, make sure that there have been no updates on the live site or they will be lost when you restore the site.
When updating a WordPress site, following these practical strategies will help ensure a smooth upgrade. Using a systematic procedure helps you to identify potential issues and also gives you a restore point should you experience a failure at any point.
Remember to do the following:
- When in doubt, check the WordPress Codex for the official recommendations.
- Backup the website and make sure the backup is good.
- Create a test version of the website either locally or on a development server.
- Wait a week before upgrading WordPress on a live site. And only span one release. Otherwise, go the incremental route.
- Make sure all plugins are compatible with the current WordPress release.
- Check out theme support forums to learn of potential problems with theme updates.
- Wait until the major theme issues have been worked out before upgrading.
- Test WordPress release updates, and plugin and theme updates on a test site.
I hope these strategies are helpful to you. Please share any strategies you might use in the comments below!
Image credit: Fotolia