Skip to content

Instantly share code, notes, and snippets.

Avatar

André sixtyseven-multimedia

  • Germany
View GitHub Profile
@sixtyseven-multimedia
sixtyseven-multimedia / maintenance.php
Created Apr 24, 2017 — forked from timoleinio/maintenance.php
WordPress maintenance.php example
View maintenance.php
<?php
// Return http response 503 service unavailable. This is important for SEO too!
$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' );
header( 'Retry-After: 600' ); // 10 minutes
?>
<!DOCTYPE html>
<html>
You can’t perform that action at this time.