Imagine you see a notice that a plugin, theme, or perhaps your WordPress core files require upgrading. You backup your site, run the update, and then there’s an interruption caused by a conflict between the upgrade and existing plugins, or the upgrade and custom code, and you get an internal error.
You remove the offending plugin, fix the custom code, and you are able to upgrade, but then you go to the front end of your site and see this on your screen:
The site is stuck in Maintenance Mode.
In this article, we look at the simple steps that will remove this so you can return your site to its desired state.
What is Maintenance Mode?
Maintenance Mode is a WordPress core feature that suspends access and functions during updates and installations. These updates require some backend processes to stop for a short period of time (usually seconds), so the WordPress core creates a file, .maintenance, to alert front end users and admins who are not already logged into the install that updates are happening. Once the process is complete, the file is deleted and the site goes back to normal.
The issue comes when there is a conflict that leads the file to believe that it is still needed or that the deletion process is interrupted. The .maintenance file continues to run even after the update is completed, and the message above is displayed.
Thankfully the process to resolve this is simple as long as you are familiar with sFTP. We’re going to remove the .maintenance file (the core files will create a new one the next time you update).
Removing the .maintenance file
If you have an sFTP client like FileZilla or Transmit
- Login and navigate to the root (the same place as the wp-config.php file)
- If you cannot find the file, it’s probably hidden. Select the option in the client to view hidden files (this is different for each client; consult your specific client for exact instructions)
- Once you find the file, delete it and refresh the client
- Clear the cache on your browser and test your site
Once you do this, your site should be back up and running.
How do I prevent this?
You can follow a few simple steps to help prevent conflicts:
- Most conflicts stem from allowing update alerts to stack up. Update them as soon as they become available. You can view them from within your WP-Admin dashboard.
- Ensure that all your plugins/themes are compatible with the latest version of WordPress. If not, reach out to the plugin or theme developer to inquire about when they plan to release a new version
- When a plugin or theme has an update available – update them! Just make a backup first
That’s it?
That’s it. It’s a simple fix to an extremely frustrating issue.