A few days ago I wrote a post about WordPress Maintenance Mode Without a Plugin. A common question that I got afterwards was whether or not the maintenance page could be styled. The answer, is yes it can be.

After wp-settings.php determines whether or not to put the blog into maintenance mode it checks to see if there is a file titled maintenance.php located in WP_CONTENT_DIR which is by default wp-content/.

Simply create a file at wp-content/maintenance.php containing the code you want to display the for the maintenance page. Below is a sample of code based off of the default maintenance page.

  1. <?php
  2. $protocol = $_SERVER["SERVER_PROTOCOL"];
  3. if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
  4. $protocol = 'HTTP/1.0';
  5. header( "$protocol 503 Service Unavailable", true, 503 );
  6. header( 'Content-Type: text/html; charset=utf-8' );
  7. ?>
  8. <html xmlns="http://www.w3.org/1999/xhtml">
  9. <body>
  10. <h1>Briefly unavailable for scheduled maintenance. Check back in a minute.</h1>
  11. </body>
  12. </html>
  13. <?php die(); ?>

Modify as needed, add some css, some images and there you go.