Custom WordPress Database Error Page

Filed Under development |   

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.

Related posts


Comments

6 Responses to “Custom WordPress Database Error Page”

  1. vish on June 4th, 2008 3:57 am

    Nice article. wordpress added some plugins which helps us to modify source codes. But somestimes this database file can give error. In this situation you can use access repair utility to repair database.

    Thanks

  2. 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 [...]

  3. 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 [...]

  4. 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 [...]

  5. Sun Blog » Blog Archive » Build the page of WordPress database mistake that defines oneself on January 22nd, 2009 6:10 pm

    [...] edition: Custom WordPress Database Error Page Posted in Uncategorized on January 22, [...]

  6. Top Ten Wordpress Security Tips « BLOGCHINA.ME on April 1st, 2009 12:00 am

    [...] Custom WordPress Database Error Page (5) [...]

Leave a Reply