Get Email Notification When Any Database Error in Your WordPress Site

| Last Updated: | In: WordPress, WP Labs

If you want to get notification email on your email address when any database related errors occurred in your WordPress websites.

Bellow is the simple WordPress code hacks which will allow you to send a notification email when any database error occurred on your site.

WordPress Custom Post Types

How to get email notification when any database errors in your WordPress websites

Create a PHP file named “db-error.php” and add the below code and then upload this file inside your Root/wp-content/ folder. WordPress will automatically execute this file when any database related issues in your site.

How to Create Custom Database Error Page in WordPress

If you want to display the custom page when your site has any database related problems, then add the below code at the and of the “db-error.php” file.

Tags: , , , , , , , , ,

About: Prem Tiwari

Prem Tiwari is the founder of and is a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby.

You may also like:

Get Free Access of 450+ Scripts

Don't worry you'll not be spammed!

Featured eBook

WordPress Security Guide

Free Guide: Learn how to implement security guideline in your WordPress site...


Free WordPress Setup Service

Free WordPress Setup

Want to Setup WordPress Blog Setup? I will help you in the setup of your WordPress blog.

Click Here

Discount Coupons

Pincode Finder

pincode-finder tool

Online Pincode Finder

Best tool to locate post Office address and pincodes of all india...