Here’s how to make a custom database error page for WordPress.

If your site’s all set up and you see “Error establishing a database connection,” that’s an immediate “oh crap” situation.

Hostgator.com, the company that hosts this website, has had some issues recently, and I’ve seen that screen a little too often.

If you want to define a custom “Error establishing a database connection” screen, add a file to your /wp-content/ folder named db-error.php. That will be loaded instead of that stupid message. Check out SEODenver.com’s db-error.php.