Today while updating a plugin, update window got stuck at following image,
And I was not able to figure out why was it. Then I went back to the update page and saw the following message,
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.
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.
It will show you the message enabling maintenance mode but still your site will be up.
Hope this helps.