Can’t figure out why your WordPress site is stuck in maintenance mode?
Don’t panic. We’ve got you covered. Getting stuck in maintenance mode is quite common and it has happened to us too. The panic and frustration trying to get the site back up and running, worrying about losing visitors and revenue – we’ve been through it!
The good news in all this is that we can help you fix it and prevent it in the future.
In this guide, we’ll walk you through:
- Why your site is stuck in maintenance mode
- How you can fix it
- What you can do to prevent it from happening again
If you need to fix your website immediately, skip ahead to find out the different solutions to fix the problem of being stuck in maintenance mode. We strongly recommend taking a backup if you can before you proceed with fixing the issue on your site.
Why Is Your Site Stuck In Maintenance Mode?
Understanding why your site is stuck can speed up the process of finding the right solution. We’ve addressed the different reasons why your site gets stuck in maintenance below.
Whenever you run an update or an automatic update runs on your site, WordPress’ inbuilt maintenance mode kicks in. It temporarily hides your site from visitors while the update replaces the old version of the software with the new one.
You’ll see the following message on your WordPress dashboard:
During this process, it creates a file called .maintenance that enables maintenance mode and deletes it once the update is done.
Usually, this goes smoothly and only takes a few seconds to complete. But on occasion things go wrong:
1. You accidentally close the browser while running an update.
2. You close the browser not knowing an automatic update is running.
3. The update timed out on its own and the .maintenance file isn’t deleted.
4. You’re updating too many things in one go such as running bulk updates on plugins.
5. An update caused an incompatibility issue that caused a glitch in the process.
PS: If you are not sure if you have set up the Maintenance mode the right away, we recommend you checkout our guide on WordPress Maintenance Mode.
Once this happens, you’ll see a message like so:
Now, this isn’t always the case. You may have used a plugin to enable maintenance mode and now it’s stuck. We explain how to fix both issues next.
How to Fix WordPress Stuck In Maintenance Mode
- Solve WordPress Default Maintenance Mode Getting Stuck
- Solve Plugin Causing Stuck in Maintenance Mode With Plugin
1. Solve WordPress Default Maintenance Mode Getting Stuck
As we mentioned, when you run an update, WordPress enables its own maintenance mode. It creates a file named .maintenance. If this file is present on your site, your site will be in maintenance mode.
To disable maintenance mode on your own, you need to delete this file.
Step 1: Log in to your hosting account. Go to cPanel and access the File Manager.
Step 2: You’ll see a folder called public_html. Open it and look for a file named .maintenance.
In case you’ve named your website’s folder something else, please select that folder.
Step 3: Right-click on the file and delete it. Go back to your website and it should function as normal.
PRO TIP: If you still see maintenance mode active, clear your cache. The cache saves pages and content of your website to save loading time. Once you clear your cache, your website will serve the latest version available.
2. Solve Plugin Causing Stuck in Maintenance Mode With Plugin
There are plenty of WordPress plugins that enable you to activate and deactivate maintenance mode on your site. And for the most part, these plugins work great! They make it so easy to make a fully customized page to notify your visitors that your site is under maintenance.
However, once in a while, problems do arise, the most common one being stuck in maintenance mode.
Here are some sure-shot solutions you can try:
1. First off, clear your cache. This is usually the most basic and easiest solution. If you’re using a caching plugin, clear your cache. If not, follow our guide to clear your cache.
2. If you have access to your wp-admin dashboard, try deleting and re-installing the plugin.
3. If you’re using an outdated version of the plugin, update it to the latest version.
4. Contact the developer of the plugin and explain the problem. They will guide you in resolving the issue. If they identify any bugs in the plugin, they will resolve it and release a new version.
5. If you don’t have access to the developer’s support, you can ask for help on the WordPress Support Forums. Alternatively, you can also ask for support on popular forums like Reddit, Quora, and StackExchange.
If none of these solutions worked for you, we have a few more tricks that you can try out.
Bonus: Miscellaneous Ways To Solve Stuck in Maintenance Mode
1. Check Your Theme for a Maintenance Mode Option
Sometimes, themes have pre-installed plugins. If there’s a maintenance mode plugin bundled with your theme, it could be overriding any other maintenance mode solution on your site. Check if your theme has a maintenance mode option and disable it if it’s possible.
2. Reindex the Page Using Google Search Console
Have you been able to fix maintenance mode issues but when you Google your website, it still shows up as ‘Site is under maintenance’?
This is because Google regularly crawls and indexes your website. If it is still showing maintenance mode on the search results page, you can request for re-indexing using Google Webmasters. Alternatively, you can just wait for the Google bot to crawl your site again.
3. Manually Delete Maintenance File
Lastly, if you went into the backend of your site and manually inserted a code snippet to enable maintenance mode and things went wrong, here’s what you can try.
- If you have a backup copy, you can restore your backup. It’s not a sure-shot, but it could possibly help remove the maintenance mode.
- Go back to the file in which you inserted the maintenance mode snippet. Delete the code or rename the file. For example, rename the .maintenance file to .maintenance-disabled.
PRO TIP: Always take regular backups of your WordPress site. When things go wrong, you can use your backup to restore your website to normal. We recommend taking a backup right before installing updates, new plugins, or themes, and any time you’re making major changes to your site.
How To Prevent WordPress From Getting Stuck In Maintenance Mode
As much as we’d like zero downtime for our WordPress sites, maintenance mode is unavoidable under certain circumstances. But there are a few precautions you can take to avoid ever getting stuck in maintenance mode again.
- Use a staging site to test changes
- Be aware of pre-installed elements on your site
- Avoid bulk updates
- Always take a backup of your WordPress site
- Check plugin compatibility before updating
1. Use a staging site to test changes
A staging site is a clone of your website that you can easily create using a plugin like BlogVault.
You can use this site to experiment – try out new plugins and themes – test updates – and even make content changes.
Once you’re happy that the changes look and function the way you want, you can merge your changes with your live site. This saves you the trouble of replicating the changes on your live site again.
2. Be aware of pre-installed elements on your site
Always check your theme to see if there are plugins that are pre-installed. Ensure that there is no maintenance mode plugin that will interfere with your website’s operations.
3. Avoid bulk updates
Bulk updating plugins tend to put a heavy load on your website. This leads to timeouts and stalled updates. It’s better to test updates on a staging site and merge the changes.
You can also update plugins one-by-one or in smaller batches.
4. Always take a backup of your WordPress site
When it comes to running a WordPress site, things do go wrong from time to time. Backups serve as a safety net for such circumstances. Before you run updates or make major changes, especially manual changes in WordPress files, take a backup of your site.
You can get automated and scheduled backups using any of the popular backup plugins available.
5. Check plugin compatibility before updating
WordPress is constantly improved upon and updated. As the software develops, old versions of themes and plugins become incompatible. To stay compatible, developers of themes and plugins fix the software and release updated versions.
When you are updating a plugin or theme, you can check its compatibility with your WordPress core.
This will indicate whether updating the plugin will cause potential problems.
By taking these few measures, you can prevent getting stuck in maintenance mode. Or at least you’ll be able to resolve the issue faster.
With that, we come to the end of our guide on how to fix being stuck in maintenance mode. Just keep in mind to always take a backup of your site and use staging whenever possible. This will help you not only in maintenance mode issues but a whole range of possible problems.
If you liked this guide, you might find our other resources handy when it comes to maintaining your WordPress site:
- How to Update WordPress Website Safely? (Ultimate Guide)
- 7 WordPress Maintenance Tasks To Keep Your Website In Optimum Health
- Top 5 WordPress Maintenance Services to Choose From
If our solutions helped you fix your site, give us a shout out on Twitter. We’d love to hear from you.