Skip to content

Instantly share code, notes, and snippets.

View sixtyseven-multimedia's full-sized avatar

André sixtyseven-multimedia

View GitHub Profile
@sixtyseven-multimedia
sixtyseven-multimedia / maintenance.php
Created April 24, 2017 00:50 — forked from timoleinio/maintenance.php
WordPress maintenance.php example
<?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>