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.

Prem Tiwari

Prem Tiwari is the founder of and also a professional developer and a blogger by hobby.

Tags: , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.