How to Fix WordPress Stuck in Maintenance Mode

Share on:

Whenever you are updating a plugin or a theme, you will see that the words “entering maintenance mode” and “exiting maintenance mode” appear. But sometimes, due to slow servers, WordPress gets stuck in maintenance mode. Don’t worry, I will help you to fix it.

What Causes WordPress to Be Stuck in Maintenance Mode?

WordPress Maintenance Mode

During a plugin/theme update, WordPress automatically creates a .maintenance file in the root folder of the installation. After successfully completing the upgrade, WordPress deletes that file.

But, sometimes, due to slow servers, WordPress is unable to delete that file (due to server timeout). Due to the .maintenance file in the WordPress root directory, WordPress gets stuck in maintenance mode.

Enabling and Disabling Maintenance Mode

Most of the time, it only takes a couple of seconds to get out of maintenance mode. But, due to the following mentioned reasons, it may not happen.

  • During an update, by mistake, you closed the tab
  • A slow server which leads to a timeout

Maintenance mode looks like the first screenshot in this post. In maintenance mode, when you visit your site, you will see the following message:

Briefly unavailable for scheduled maintenance. Check back in a minute.

The solution is to delete the .maintenance file.

How to Delete the .maintenance file

To delete the .maintenance file, open the fie manager of CPanel OR use FTP to connect to the server. Then go to the folder where WordPress is installed. Then find the .maintenance file and delete it.

Deleting .maintenance file

If your hosting has server-level cache, then clear it. Now try to visit your site. It will show up properly.

How to Avoid WordPress Getting Stuck in Maintenance Mode?

As mentioned above, there are two main reasons due to which WordPress gets stuck in maintenance mode:

  • During an update, by mistake, you closed the tab
  • A slow server which leads to a timeout

So, try to change your hosting as you cannot usually fix hosting related issues yourself (in shared hosting). Also, try not to upgrade all of the plugins and at once.

I hope that this article has been useful for you. If you have any queries or suggestions, then please let me know in the comments down below.

Share on:

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

I am the founder of WPSteam. I am currently doing my B.Tech in Electronics & Telecommunication Engineering from KIIT University, Bhubaneshwar, India

Leave a Reply

%d bloggers like this: