Fix Briefly Unavailable for Scheduled Maintenance Error in WordPress

Why The Maintenance Error Occurs?

Maintenance mode page is technically not an error. It is a notification page. During the update process, WordPress downloads necessary update files to your server, extracts them, and installs new files. WordPress also puts your site on maintenance mode and displays the “Briefly unavailable for scheduled maintenance” notice during the process.

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

Subscribe to our newsletter in the box at the top left of the sidebar to keep up to date with our up coming features.

How to Fix Maintenance Error in WordPress

First thing you would want to make sure is that your site is updated properly to the latest WordPress. An unfinished or interrupted update may cause issues when your site comes out of maintenance mode. Checkout our guide on how to manually update WordPress using FTP.

Once you have updated WordPress, all you have to do is delete .maintenance file from your site’s root folder using FTP. If you can not see .maintenance file in your site’s root directory, then make sure you checked your FTP client to show hidden files. In Filezilla, you can force it to show hidden files by clicking on Server » Force showing hidden files from the menu bar.

WordPress creates a .maintenance file during the update process which indicates that your site is in the maintenance mode. Unless this file is removed your site will remain in the maintenance mode and your users will continue to see the notification.

How to Customize Maintenance Mode Notification

An easier solution to avoid showing the default maintenance mode notification in WordPress is by redirecting visitors to a temporary maintenance page in WordPress. You will have to put your site on maintenance mode before you update or do any modifications that could temporarily make your site inaccessible to users.

However, if you don’t want to go through manually putting the site into update mode, then you can create a maintenance mode page in WordPress without using a plugin. Simply create a new file maintenance.php on your desktop and paste this code inside it.

01 <?php
02 $protocol = $_SERVER["SERVER_PROTOCOL"];
03 if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
04     $protocol = 'HTTP/1.0';
05 header( "$protocol 503 Service Unavailable", true, 503 );
06 header( '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(); ?>

Upload this file to your WordPress site’s wp-content directory. Now whenever you are updating your site WordPress will show this page during the maintenance mode. You can use CSS to style this page anyway you want

Leave a Reply