Create Your Own WordPress Fail Whale

For WordPress sites, the equivalent of Twitter’s Fail Whale is this plain looking screen:

WordPress: Error establishing database connection.

This page shows up when WordPress cannot connect to your MySQL database. The entire page, complete with head and body, is written into the code, so the good news is we can put whatever we want here.

To get started, go to your WordPress folder and dive into /wp-includes/functions.php. Around line 2818 you’ll find the complete HTML content of the database connection error page. If it is no longer located on this line, perform a search for “Error establishing a database connection”.

Your web hosting still works, so you can reference static content, images and CSS files. I recommend copying the source of your Home or 404 page and adding a helpful error message letting customers know you’re site will be up shortly.

Let me know what you come up with!

Short URL: http://jwr.cc/x/1d

Related Posts

This entry was posted in WordPress, design, tutorial. Bookmark the permalink.

One Response to Create Your Own WordPress Fail Whale

  1. Pingback: Create Your Own WordPress Fail Whale · Jay Robinson

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comment moderation is enabled. Your comment may take some time to appear.