Get Email Notification When Any Database Error in Your WordPress Site

Prem Tiwari - - WordPress, WordPress Snippets

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.

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: , , , , , , , , ,