When updates are made in WordPress, it briefly puts your site into maintenance mode. While it is normally temporary, it is possible for your website to get stuck in maintenance mode. I discovered this problem recently, so figured I would share my experience and how I fixed the error.
Table of Contents
- Why does WordPress get stuck in maintenance mode?
- How to fix the WordPress stuck in maintenance mode error
- Preventing the stuck in maintenance mode error
Why does WordPress get stuck in maintenance mode?
WordPress has a built-in maintenance mode as part of its automatic update system. It is activated whenever you update WordPress core, themes or plugins from within your WordPress dashboard.
When you run an update, you will see a couple messages on the update screen.
In the majority of cases, your site goes into maintenance mode, runs the updates and then returns to normal. Occasionally, something goes wrong and your site gets stuck in maintenance mode.
A few reasons for this happening may include:
- You inadvertently close your browser tab or window in the middle of the update process.
- You’re attempting to update a massive amount of plugins at one time.
- There is some sort of compatibility issue (with a theme or plugin/s) which causes maintenance mode to freeze up.
If your site gets stuck, you’ll see the following message when you visit your site on the front end:
Briefly unavailable for scheduled maintenance. Check back in a minute.
Luckily, this is super easy to fix, provided you have access to ftp or file manager within cPanel.
How to fix the WordPress stuck in maintenance mode error
While updates are being run on your site, it creates a file named .maintenance in the root directory of your WordPress site (the same one where your wp-config.php file is located).
In order to fix the WordPress stuck in maintenance mode error, you’ll need to manually delete the .maintenance file. You can do this via FTP or through File Manager within cPanel.
To resolve the error, simply go to your website’s root folder, locate the .maintenance file and delete it. Now, your site should be working again.
You will want to clear the cache on your WordPress website too. Since I host my site with SiteGround, I can clear my cache from within the WordPress dashboard using their SG Optimizer plugin or from within my hosting account.
Once you’ve fixed the stuck in maintenance mode error, you can try to run the updates again.
Preventing the stuck in maintenance mode error
This error is super simple to fix, but it’s best to try and prevent it from happening in the first place. There are a couple things that you can do to reduce the chance of it getting stuck again, including:
Making sure plugins and themes are compatible
Before running updates, ensure that any plugins or themes you’re using are compatible with your version of WordPress. You can check this from within your dashboard by going to Plugins > Installed Plugins. Then, with any plugin that needs to be updated, simply click on the Details link underneath it.
Then, in the right-hand sidebar of the plugin screen which opens, you’ll see info associated with it, including the latest version of WordPress it is compatible with.
Don’t update a ton of plugins at once
If you’re using a bunch of plugins on your WordPress site, it’s possible that many of them could need updates at once. Instead of updating them in a big batch, do them one (or a few) at a time.
While generally it’s okay to update them all in bulk, in rare cases it could get hung up and cause maintenance mode to freeze.
Using self-hosted WordPress, you’re bound to run into an error every now and then. While making updates on my site recently, it got stuck in maintenance mode and I wasn’t quite sure how to fix it. I quickly found a solution online, and figured it only made sense to write a tutorial about it.
Hopefully, it will help you to get your site back up and running you’ve experienced the stuck in maintenance mode error. If there is anything I missed, or if you have a question, please leave it below in the comments.
If you found this post helpful, please share it and spread the word!
Want more like this? Sign up for my newsletter to receive helpful WordPress Tutorials, Tips and Tricks.