Posts WordPress stuck at briefly unavailable for scheduled maintenance
Post
Cancel

WordPress stuck at briefly unavailable for scheduled maintenance

Today while updating a plugin, update window got stuck at following image,

Wordpress scheduled maintenance message

Wordpress scheduled maintenance message

And I was not able to figure out why was it. Then I went back to the update page and saw the following message,

Enabling maintenance mode in wordpress

Enabling maintenance mode in wordpress

Here you can see the wordpress enables maintenance mode before pushing any update. But what if  update is not completed successfully?

If update does not happen successfully your page gets stuck on above image and your site shows message in first image.

How can you remove this annoying messages? After googling out I figured out wordpress creates a .maintenance page in the root directory where your wordpress is installed. You need to delete this file, which I did. After deleting the site was up again.

Wordpress maintenance file

Wordpress maintenance file

But this happened everytime I tried to update that plugin. So I searched for place where wordpress was checking if it is in maintenance mode.

WordPress has a file called as “wp-settings.php” in the root directory. It has line of code that checks if maintenance mode is enabled. So just comment that line and wordpress will not go in maintenance mode again.

Bypass maintenance mode check in wordpress

Bypass maintenance mode check in wordpress

It will show you the message enabling maintenance mode but still your site will be up.

Hope this helps.

This post is licensed under CC BY 4.0 by the author.