Clicky

Tutorials

How to Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress

A common problem that users face while updating shared WordPress hosting is that the update process may timeout, which leaves your site in maintenance mode and inaccessible.

 

error screenshot

 

This post is dedicated to teaching you how to fix “Briefly unavailable for scheduled maintenance” error in WordPress.

Before we move ahead, let’s take a look at why this error occur?

Why The Briefly Unavailable for Scheduled Maintenance Error in WordPress Occurs?

Well, first of all, let me clear, it’s technically not an error. It is more of a notification page. During the update process, WordPress downloads necessary update files to your server and extracts them. After that, it installs the new files. WordPress puts your site in maintenance mode displays the “Briefly unavailable for scheduled maintenance” notice during the process.

If everything works out normally, then this notice will probably be displayed for only a few seconds. However, sometimes due to low memory limit issue or web server’s slow response, the update script may get timed out or get interrupted. If this happens, WordPress does not get a chance to take your site out of maintenance mode.

 

How to fix Briefly Unavailable for Scheduled Maintenance Error in WordPress?

Interrupted or unfinished update causes issues when your site comes out of maintenance mode. To avoid this, make sure to update your WordPress site properly to the latest version.

After updating WordPress, you’ll have to delete .maintenance file from your site’s root folder using FTP. If you’re unable to update .maintenance in your site’s root directory, then make that you’ve checked to show hidden files in your FTP client. If you’re using Filezilla as your FTP client, you can force it to show hidden files. To do so, click on Server » Force showing hidden files from the menu bar.

Unless the .maintenance file is not removed from your site, your user will continue to see the notification. This is so because WordPress creates a .maintenance file when you update it, which indicates that your site is under maintenance. Hence, showing Briefly Unavailable for Scheduled Maintenance Error in WordPress

Customize maintenance mode notification

It is good practice to show a customized maintenance mode notification in WordPress. You can redirect visitors to a temporary maintenance page in WordPress. First, put your site in maintenance mode before you do any modifications that could temporarily make your site inaccessible to users.

If you don’t wish to put your site on maintenance mode manually, you create a maintenance mode page in WordPress without using a plugin. You’ll have to simply create a new file by the name .maintenance.php on your desktop and paste the following code inside it.

01<?php
02$protocol = $_SERVER["SERVER_PROTOCOL"];
03if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
04 $protocol = 'HTTP/1.0';
05header( "$protocol 503 Service Unavailable", true, 503 );
06header( 'Content-Type: text/html; charset=utf-8' );
07?>
08<html xmlns="http://www.w3.org/1999/xhtml">
09<body>
10<h1>We are updating the site, please check back in 30 minutes.</h1>
11</body>
12</html>
13>?php die(); ?>

After pasting the code, upload this file to the wp-content directory of your WordPress site. Now, whenever you’re updating your WordPress site, it’ll show your custom page during the maintenance mode.

You can additionally use CSS to style this page as per your wish.

This is how you can fix Briefly Unavailable for Scheduled Maintenance Error in WordPress. If you know any other method, please share with us in the comment section.

Share this Story
Load More Related Articles
Load More By Editorial Team
Load More In Tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *

Join Over 50,000+ Subscribers

Interested In
  •   
  •           
  •                      

Search