Bobcares

Fix wordpress stuck in maintenance mode easily

by | May 16, 2020

You might have noticed that at times while performing an update in WordPress, it gets stuck in maintenance mode. The only message that you receive on-screen is

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

Our Support engineers perform plugin or WordPress version updates as a part of our WordPress Support service.

Today let’s take a look at how to perform updates without getting stuck in the maintenance mode.

 

What causes WordPress to get stuck in maintenance mode?

WordPress core automatically launches maintenance mode when plugins, themes, or WordPress version is updated from the WordPress dashboard. This consists of two steps:

  • Enabling maintenance mode
  • Disabling maintenance mode

 

wordpress-stuck-in-maintenance-mode

 

What happens when WordPress enables the “Maintenance mode”?

It creates a file called “.maintenance” in the website directory. WordPress scripts honor this file and stop showing web pages as long as this file is present.

WordPress usually removes this file when the updates are completed. At times WordPress fails to remove this file automatically, which causes it to get stuck in the maintenance mode.

The common situations where WordPress fails to remove this file include:

  • Incompatibility of the updated versions of any plugin/theme.
  • Poor server parameters interrupting the update script.
  • Any other Interrupt in the update process.

 

 

How to fix WordPress stuck in maintenance mode

To exit from the maintenance mode, you need to remove the .maintenance file. This file can be easily removed by connecting to the backend of the website using FTP. If you are using cPanel, you may use the File manager option to remove the .maintenance file.

wordpress-stuck-in-maintenance-mode

 

At times removing the .maintenance file may not fix the issue. If you find that WordPress is still stuck in maintenance mode even after removing the file as per the above method, try editing the ‘WP_INSTALLING’ part in wp-activate.php to false.

define (‘WP_INSTALLING’, false);

At times the steps above may not help in fixing the issue completely. We may be retrieved from the maintenance mode, however, the update getting stuck in between could have caused some files to get corrupted. A restore from a previous backup may be required in such cases to bring it back to a previous state.

 

How to avoid WordPress from getting Stuck in maintenance mode?

WordPress getting stuck in the mid of an update could be avoided by just keeping a note of few points. Those include:

Checking the compatibility of the plugin before performing the update

In most cases the stuck in maintenance mode is caused by some conflict of the newer version of the plugin to work with the existing setup. Thus it would be a good idea to check the compatibility of the newer version of the plugin, preferably in a development environment prior to performing the upgrade. Our Support Engineers also cross-check the system requirement page of the plugin with that of the server configuration. This helps them to avoid the maintenance from getting stuck in between the update.

Perform one update at a time:

When a number of plugin updates are performed at the same time, server resources are likely to get used up and the update process may get stuck.

Thus it is always recommended to perform the updates periodically, thereby avoiding the chances of performing multiple updates at the same time. Even if there are multiple pending updates available, try to perform them each in a one at a time manner.

[Need help to perform the WordPress update? We are available 24×7]

 

Conclusion

In short, today we discussed the different causes for WordPress update to get stuck in maintenance mode. We also discussed on how to get back to a normal state and how our Support Engineers avoid it from happening in the future.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.