As WordPress is a dynamic web app, it's hard to have your homepage available when everything else is being updated.
Anytime you run an update for a plugin or WordPress core, it will trigger its maintenance mode. This shows the 'Briefly unavailable' page.
Even using the approach above will result in a visitor seeing the standard maintenance page if they try to visit the site as the update script is run.
The best approach I think is to create your own maintenance.php file and this is better than a static page.
.. NB I'm only showing a screen grab of my maintenance page to give you a bit of an idea of what could be achieved.
You can see my maintenance.php in action
Maintenance mode
To put WordPress in Maintenance Mode create a file called .maintenance in your /wordpress folder.
I always have mine saved as aaaa.maintenance so I can find it.
Maintenance mode - logged in users allowed.
This step allows logged in users to access WP-admin and visit the front end.
Edit the aaaa.maintenance and insert this code:
<?php
function is_user_logged_in() {
$loggedin = false;
foreach ( (array) $_COOKIE as $cookie => $value ) {
if ( stristr($cookie, 'wordpress_logged_in_') )
$loggedin = true;
}
return $loggedin;
}
if ( ! stristr($_SERVER['REQUEST_URI'], '/wp-admin') && ! stristr($_SERVER['REQUEST_URI'], '/wp-login.php') && ! is_user_logged_in() )
$upgrading = time();
?>
Create your own maintenance.php
Under wp-content create a file called maintenance.php
Open the file and add this code:
<?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' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--- insert HTML here including hard coding your CSS -->
</body>
</html>
<?php die(); ?>
Make sure the bottom of the file has the <?php die(); ?>
So now you have your own static page you can invoke anytime you rename aaaa.maintenance to .maintenance
and you can visit /wp-admin even if you are not logged in.