Custom Briefly Unavailable for Scheduled Maintenance message in WordPress

Categories: WordPress.

The default message that users get while you are updating your WordPress site is not informative and some users might think that your site has gone for good. Read on to learn how modify your WordPress “Scheduled maintenance message”.

Usually updating WordPress is quick and the message below is not displayed for very long:

Briefly unavailable for scheduled maintenance. Check back in a minute.

Sometimes maintenance can take a while especially if the downloading of the updates has been slowed down for some reason.

Custom Maintenance Page

To reassure your users that your site will be back online soon and that your business and website hasn’t gone for good a custom maintenance page is a good idea.

Create a file /wp-content/maintenance.php and put the following contents into 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(); ?>

Now when the site goes into maintenance mode the maintenance.php file will be shown. It can include anything you want including CSS formatting to style the page how you want. A good start might be to copy the home page and add your maintenance message to it.

You will now have reassured users whenever your site is being updated.

 

Leave a Reply