Custom WordPress Database Error Page

Filed Under development |    4 Comments

From what i have mentioned before, we can use a program to monitor the WordPress MySQL server, when the server is down, WordPress will auto send an e-mail and write to a text log file in a recorded. Now, WordPress 2.3.2, the latest version of the popular blogging platform allows you to define a custom database error page.

It is very simple. Just follow the following steps and within a few minutes your custom database error page is ready!

First, upload a file named log.txt to the WordPress root directory, chmod it to 666.

Second, Download the file db-error.php and upload it to WordPress content directory(wp-content/db-error.php).

Finally, replace the e-mail address of the code to your own e-mail.

That’s it! From now on this error file will be report the error whenever your WordPress blog has encountered some trouble connecting to the database server.


Comments

4 Responses to “Custom WordPress Database Error Page”

  1. Générer une action lors d’un problème MySQL sous Wordpress on July 12th, 2008 4:19 pm

    [...] des soucis avec la base de donnée sous Wordpress, voici une astuce (initialement trouvée sur moon-blog.com) pour afficher un message simple à vos visiteurs et vous avertir par la même occasion à l’aide [...]

  2. Build the page of WordPress database mistake that defines oneself : LOVE BLOG on September 19th, 2008 6:34 pm

    [...] English edition: Custom WordPress Database Error Page [...]

  3. LOVE BLOG » Build the page of WordPress database mistake that defines oneself on September 19th, 2008 9:05 pm

    [...] English edition: Custom WordPress Database Error Page [...]