How to fix the ‘Briefly unavailable for scheduled maintenance.

Check back in a minute’ on WordPress?

WordPress displays this message on your website when it is undergoing an update. So, technically it isn`t an error. This message is expected to be displayed when going through the update process. But if the message stays for longer than a few seconds or minutes, depending on the number and the size of the files being updated, it is troubling.

When your WordPress site is undergoing an update, it is put under maintenance mode. Now, when the update finishes successfully, it automatically comes out of the maintenance mode, and the site is back on track.

But if the update is unsuccessful, which can be due to multiple reasons, the website gets stuck in the maintenance mode and keeps displaying this message. So, when WordPress doesn`t put the website out of maintenance mode, you need to remove this message manually.

What causes WordPress to get stuck in maintenance mode and display this message consistently?

As mentioned above, WordPress gets stuck in maintenance mode when an update isn`t completed successfully. When you try updating core files, themes and plugins simultaneously, it might run out of memory and be unable to finish the update. Due to an incomplete update, the maintenance file isn`t deleted as it is the last step in the process, and so the message on the screen persists.

BTW, if you are interested in wordpress maintenance service, click the link to check out a great resource.

The other probable reason could be closing the browser tab abruptly while the update was still running. Another reason is the update process being interrupted because of script timeout due to slow server response time. If one of the files is incompatible with the update, even then, it can cause this message to stay.

Troubleshooting the issue:

There are two ways this issue can be fixed.

1. Delete .maintenance file:

During maintenance mode, WordPress installs a .maintenance file in the root directory. And after a successful update, it automatically deletes it. So, when stuck in this mode, you need to delete this file manually. There are two ways you can do this.

A. Using FTP client:

If you are comfortable using an FTP client like FileZilla, then try this method.

Using an FTP client, look for the .maintenance file in the website’s root directory and delete it. If you cannot find this file, then from the Server menu, click on Force showing hidden files.

Once you delete this file, check your website. It should be up and running by now.

B. Using cPanel:

If working with the FTP client isn’t your cup of tea, then you can do this using your web hosting platform’s control panel.

Through your cPanel account, look for the File Manager under the Files section. Then select your website’s domain and under the public_html folder, look for the .maintenance file and delete it.

Refresh your website, and the scheduled maintenance message should most likely be gone by now.

If any of the above methods didn’t work for you, then try the next solution.

2. Edit the wp-activate.php file

You can find the wp_activate.php file just where you found the .maintenance file. Edit it using cPanel’s File Manager or download and update it from your FTP client. You need to look for the below line of code in this file.

define (‘WP_INSTALLING’, true)

Change true to false here. That is to say. Now it looks like this.

define (‘WP_INSTALLING’, false)

If you are doing this through an FTP client, then save and upload this file. And if you are using cPanel to perform this action, then just save it.

Performing this step instructs WordPress that the installation process has stopped and is no longer supposed to stay in maintenance mode. So, the scheduled maintenance message should disappear now.

How to prevent this from happening again?

Once you fix this, for now, it could likely happen again. So, you can take care of the below-mentioned things to prevent it.

  • Do not run simultaneous updates. It is best to update the plugins and themes as and when the updates are available rather than updating them all at the same time. Instead of rushing to click all the update buttons, try to be patient and do it one at a time. So, this will prevent WordPress from running out of memory and being stuck in maintenance mode.
  • Do not close the browser tab while the update is running. When an update is completed successfully, your WordPress dashboard will display a message “Disabling Maintenance mode… All updates have been completed.”. So, wait for this message to appear before closing the tab.
  • If slow server response time caused this error, then upgrading your web hosting platform can be a way to prevent this from happening again.
  • Using a staging site can be a good option. Instead of directly updating all your files to your live site, checking them on a staging site first to see that it doesn’t lead to any compatibility issues can be beneficial.
  • Before updating themes and plugins, you can check the version they are compatible with using the View Details link. 

Taking care of these things reduces the chances of getting stuck in maintenance mode again.

This guide covered the causes that could lead to WordPress getting stuck in maintenance mode, troubleshooting the issue, and preventing it from happening again. We hope it helped you fix your problem quickly.