Created
January 23, 2017 09:20
-
-
Save steveobbayi/ad7fb3d3adbac5eca32cf8d8fd0333e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // custom WordPress database error page | |
// Tell the browser that there is a bit of a mess on the server | |
header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
header('Status: 503 Service Temporarily Unavailable'); | |
header('Retry-After: 600'); // in seconds = 10 minutes | |
// You can send yourself an email notification | |
mail("your@email.com", "Database Connection Error", "Problem with the database! Come fix me!", "From: My Website's DB"); | |
// Put out the customized friendly template that matches your website | |
?> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Database Connection Error</title> | |
<style> | |
/* | |
Any required CSS rules here | |
*/ | |
</style> | |
</head> | |
<body> | |
State what you going through in a public friendly way. | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment