Why my wordpress site stuck in maintenance mode? Why it happens? What to do if my site stucks in Maintenance mode? These are few questions that comes to your mind when your site shows a message – “Briefly unavailable for scheduled maintenance or in maintenance mode”. That’s one of the most scariest nightmare for a WordPress webmaster.
But why it happens?
Maintenance mode page is a notification page and it’s not an error. When you update a plugin or any update process that takes place in wordpress, it downloads necessary update files to your server, extracts them, and installs new files. That’s the reason why your site goes in maintenance mode and displays a message “Briefly unavailable for scheduled maintenance” untill the process is completed.
How to Fix this ?
Watch following 1-minute video to know how to fix this problem :
Customizing Maintenance Mode
You can create a maintenance mode page in WordPress without using a plugin. All you need to do is create a new file and name it
maintenance.php inside wp-content folder of your site and save it after you paste the following code in it.
<?php $protocol = $_SERVER["SERVER_PROTOCOL"]; if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) $protocol = 'HTTP/1.0'; header( "$protocol 503 Service Unavailable", true, 503 ); header( 'Content-Type: text/html; charset=utf-8' ); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h1>We are updating the site, please check back in 30 minutes.</h1> </body> </html> <?php die(); ?>
You can create this file on your Desktop also and then upload it to your WordPress site’s
wp-content directory using FTP. Now when you will update your site WordPress will show this page during the maintenance mode which you can further style using CSS.