What happens when some database errors occurs in your WordPress blog? Your blog shows the ‘cannot connect to database’ page to your visitors. This default error page may show a little bit of info about your file structures. So, WordPress 2.3.2, the latest version of the popular blogging platform allows you to define a custom database error page. It is a small but important feature in WordPress. It will also help you to give a personal touch to your database error page!

Well, that’s sounds good, but how to add this custom error page to my existing blog? It is very simple. Just follow the following steps and within a few minutes your custom database error page is ready!

  • Create a simple page with your custom database error message. You may write something like “Oops! we have encountered a database error. Please check back later. Thanks”. You can use any HTML editor or a simple text editor to create this page.

  • Save the file as ‘db-error.php’. It is important. If you are using a text editor like notepad, then also save the file with .php extension.

  • Upload the ‘db-error.php’ file to the wp-content/db-error.php location of your blog.

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

Rate this:
2.5

Enjoyed this post? Please consider subscribing to EarnBlogger RSS Feed.


PerformancingAds

You Should Also Check Out These Posts: