My provider’s database server recently had some downtime and my site was displaying the classic “Error establishing a database connection” message for about an hour.

I knew what the problem was but realised it would be useful if I was able to replace that message with something a little friendlier (ideally a more verbose message contained within my site’s template, so as not to scare users).

My question is: are there any plugins that provide this functionality? Or does this error occur at too low a level for any plugins to be invoked? If so, I’ll probably edit the WP core, but it would be nice to use something more pluggable.

Many thanks,

Biggs

2 s
2

http://yoast.com/custom-wordpress-database-error-pages/

You can make your own Database Error page by adding a db-error.php to your wp-content folder (/wp-content/db-error.php). You can find a good example of such a page in the link above. Don’t forget adding header("HTTP/1.0 500 Internal Server Error"); in that file so it get a proper header message.

Leave a Reply

Your email address will not be published. Required fields are marked *