Skip to content

Instantly share code, notes, and snippets.

@lucasff
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasff/4bcecb657a9c70ca19a4 to your computer and use it in GitHub Desktop.
Save lucasff/4bcecb657a9c70ca19a4 to your computer and use it in GitHub Desktop.
Perishable Press WordPress database error
<?php // custom WordPress database error page tutorial @ digwp.com
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600'); // 1 hour = 3600 seconds
mail("spamless@domain.tld", "Database Error", "There is a problem with teh database!", "From: Montgomery Scott");
?>
<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
<head>
<title>503 Service Temporarily Unavailable</title>
<style type="text/css">
h1, p {
font-family: Helvetica, sans-serif;
font-size: 24px;
color: #333;
}
p {
font-size: 14px;
}
</style>
</head>
<body>
<h1>Captain, the ship can&rsquo;t take much more of this!</h1>
<p>Perishable Press is currently experiencing technical issues &mdash; Please check back soon!</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment