How to fix when WordPress get Stuck in Maintenance Mode

How to fix when WordPress get Stuck in Maintenance Mode

by Ravi Singh
0 comment 0 views
wordpressca

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.

wordpress-maintenance

Wordpress notification when updating (plugin, theme or wordpress)

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.

Tell us if it worked for you or if you have any other issue related to Wordpress in the comments down below. Do Subscribe us for more such How to Tech Guides on Android, iOS, Windows, Mac and Linux below or Connect with us to stay updated for more on FacebookGoogle+ and Twitter.

Leave a Reply

[script_23]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

You may also like

TechPosts Media, A Technology Media Company – All Right Reserved. Designed and Developed by PenciDesign

DigitalOcean Referral Badge

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.