Updates to your WordPress site become available all the time, whether these are updates to core files, themes, or plugins. Since many updates build off each other, the longer you wait to update, the greater the risk of something going wrong. So, updating WordPress themes, plugins, and core files becomes critical for your website. Smaller incremental updates make it easier to identify and fix an issue if there is one.
While many of WordPress’ core updates happen automatically, major release updates, along with updates to your theme and plugins, do not. People are often nervous to push that update button because there’s a chance it could result in a broken site. However, outdated themes, plugins and core files are a surefire way to a hacked site – so updating WordPress themes, plugins, and core files is necessary to prevent future vulnerabilities. But what should you do if an update breaks your site?
Your first response is probably going to be sheer terror, followed by panic, especially if you’ve just broken your LIVE WEBSITE. (By the way, we recommend making the updates on a staging site first.) This post covers various ways an update can potentially break your site and provides step-by-step instructions on how to fix it as quickly as possible. Just make sure you have the correct WordPress admin permissions to navigate and troubleshoot the following scenarios.
When the WordPress core gets updated, WordPress goes into what we call “Maintenance Mode.” Instead of seeing your website, a visitor will see a message stating that the site is down briefly for maintenance and to check back in a moment. (By the way, this screen is customizable.) This is to make sure nothing looks broken on your site while the update is happening. During this time, WordPress deletes all existing files for that item and replaces them with the new version. Once the update is run successfully, WordPress goes out of Maintenance Mode, and you get a notification confirming success.
It is possible for something to go wrong with the update, causing your site to get stuck in Maintenance Mode. If it stalls, the most common issue has to do with a file (called .maintenance) that WordPress uses to put your site into Maintenance Mode. If it fails to be deleted afterward, your site will be stuck with that message.
Fortunately, getting your site out of Maintenance Mode is a pretty easy fix – you just need to manually delete that .maintenance file. But in order to GET TO that file, you need to have access to your site's files via either your hosting account or FTP. So it is important to always have those URLs and logins on hand in case you need them in a pinch. It’s also useful to familiarize yourself with an FTP program – like the free FileZilla – so you can quickly take care of little issues like this when they arise and aren’t scrambling to find passwords. Once you have logged in via FTP, go to the site’s root (usually in a folder called public_html) and delete the file.
If you can’t do it yourself, your host should be able to delete it for you, although sometimes for a fee. It’s a good idea to get familiar with your host’s maintenance and support policies, as some may charge pricey fees to fix your site. You may find that having a developer who can be on-call in times of emergency is a better option.
After getting your site out of Maintenance Mode, it’s always good practice to check your site. The update may have disabled your theme or plugin if it broke during the update.
Sometimes updating core files or your themes or plugins can cause other things to break on your site. When this happens, you will need to find the issue and fix it. In the meantime, you can roll back to a previous version of the plugin or theme (or even the WordPress core version) while you work out a fix.
The easiest way to do this is to simply use a backup of your site and revert to the most recent version. This is not a permanent fix – you will still have to run the updates at some point, and likely soon if there are security patches involved. Fixes might involve changing some code in your theme, settings in your plugin, or replacing a plugin entirely.
Aside from backups, you can manually replace the files via FTP or use the WP Rollback plugin, which gives you the ability to roll back to previous versions of a plugin or theme from the dashboard.
To be frank, a core update is almost never the reason for your site breaking. WordPress puts a lot of effort into maintaining backward compatibility – meaning, it still supports deprecated functions as best it can for those who are running older versions.
WordPress Core updates are carefully vetted. If your site breaks after a Core update, it is most likely a plugin or theme that has not been updated to support the latest version of WordPress. All WordPress developers who have contributed either themes or plugins to the online repository get a direct email for every core update, outlining the things that are going to change. This gives the developers time to update their plugin or theme to support this version. But not all theme and plugin developers are vigilant about this.
Sometimes, you run a bunch of updates at one time and aren’t sure which one broke your site. You can start by deactivating all your plugins and reactivating them one by one to check which one is causing the broken site.
Once you find the plugin responsible for the break, you have a few options:
If you aren’t sure which plugin it was, disable all your plugins and reactivate until you find the culprit. If you don’t have access to the Admin, you can disable the entire Plugin directory to regain access. Rename the Plugins directory to _Plugins. Navigate back to your Admin panel, and go to the plugins directory. Go back to FTP and change the Plugins directory back to Plugins. This disables all your plugins, and you can now go in and reactivate them one by one until you find the broken one.
Sometimes, theme updates are responsible for a site break. Did you use a child theme to make code changes to your theme? If you made changes directly to your commercial or free theme, running an update will overwrite all of these changes. Never make code updates directly to your theme, unless it is a custom theme and you know what you are doing. Check out the Codex for more information on Child Themes.
It may also be that your theme wasn’t prepared for the WordPress update. This process is similar to the plugin troubleshooting process.
If the theme is the issue, go into your Themes Admin and activate the default WordPress theme. These are typically named by year. For example, in 2017, the default theme was called twenty-seventeen. If you do not have access to your Admin, here is where our trusty FTP client comes in handy. Navigate to your Themes directory [mywebsite.com > wp_content > themes], and rename the offending theme. This will deactivate it and activate the default theme automatically.
Activating the default theme will let you know if it’s a theme issue or not. If the problem still persists after activating the default theme, then it is likely a plugin issue. If it is a theme issue, then check for updates with the theme creator, or choose another theme that supports the current WordPress version. It is also useful to contact Support and notify them of the issue. If the theme was from the WordPress Repo, leave a post in the forums. If it was a commercial theme, contact their support directly to report it.
If you see a 500 Internal Server Error on your site, this means you’ve got a hosting issue. Your hosting may be down, or you have run out of memory on your server. Contact your hosting support to solve this problem.
The White Screen of Death is how we WordPressers fondly refer to a site breaking so badly that all you see is a white screen. No website, no code, nothing: just white. If this happens, remember not to panic – you can troubleshoot this by deactivating our plugins and themes, which will reset everything and restore your access to the Admin for troubleshooting. Use the information above to first disable your Plugins directory, and see if your site comes back online. Next, change to a default WordPress theme. If the site is STILL white screening, you may have a corrupt version of WordPress. The best thing to do is a manual WordPress update and replace all your core files with a fresh install.
It’s easy to lose track of key information if your site has never broken before. But the first time it does, you’ll want to have as much information on hand as possible so you, your developer, or your host can troubleshoot. Below is a list of items you will need:
Of course, in an ideal situation, you will do all your updates in a staging environment, so you can catch and fix any potential issues before you update your live site. Learn more about staging sites for WordPress updates.