+if ( file_exists(ABSPATH . '.maintenance') && !defined('WP_INSTALLING') ) {
+ include(ABSPATH . '.maintenance');
+ // If the $upgrading timestamp is older than 10 minutes, don't die.
+ if ( ( time() - $upgrading ) < 600 ) {
+ if ( file_exists( WP_CONTENT_DIR . '/maintenance.php' ) ) {
+ require_once( WP_CONTENT_DIR . '/maintenance.php' );
+ die();
+ }
+
+ $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>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Maintenance</title>
+
+</head>
+<body>
+ <h1>Briefly unavailable for scheduled maintenance. Check back in a minute.</h1>
+</body>
+</html>
+<?php
+ die();
+ }
+}
+