Weblog Archive

Personalize db errors now with Wordpress 2.3.2

Mon, 31 Dec 2007 at 04:04 • Chetan • Filed under Design, Server side, Weblog

Personalizing database down error for Wordpress powered sites was one of the suggestions I offered humbly to the Wordpress team back in August 2007. Happy to note that it’s now in place in the latest Wordpress update (version 2.3.2), as Ryan notes:

As a little bonus, [version] 2.3.2 allows you to define a custom DB error page. Place your custom template at wp-content/db-error.php. If WP has a problem connecting to your database, this page will [be] displayed rather than the default error message.

It is important to note that the custom db error page file is not under the theme folder, but rather in wp-content folder. Also, it is important to avoid using any template tag (in db-error.php)1 that queries the database for stored information; because when the database is down, you cannot get a reply back from the database to show the queried info on the error page. Obvious, but if it wasn’t to you, then you know now.

As always, Wordpress team listens—that’s something I really like about them. It doesn’t matter who you are, your suggestions are always considered. That’s the strength of the community.

  1. I use plain html/php coded content in my db-error.php file. []

[ Ads ]

Related posts

Following list is auto-generated, based on this post's context as possibly related. You may, however, occasionally find some in this list unrelated, but nevertheless, we sincerely hope that you'll enjoy them too.

Respond privately

Comments are closed, but you may respond privately to “Personalize db errors now with Wordpress 2.3.2.” (Your response will not be published.)