maintenance mode

Use in theme functions.php or a plugin to put WordPress into maintenance mode.

function wp_maintenance_mode() {
    if ( ! current_user_can('edit_themes' ) || ! is_user_logged_in() ) {
        wp_die('Under Maintenance.');
    }
}
add_action( 'get_header', 'wp_maintenance_mode' );