If you’re building complex custom function in your WordPress website, or making other “experimental” changes in your site, there’s a big chance that at some point you’ll make a tiny mistake in the code which will crash your WordPress website.
It’s not the end of the world – you’ll probably find and fix the mistake in seconds, and your site will continue working as usual. But at the moment of the crash WordPress will probably send “The site is experiencing technical difficulties” email report to the administrator email. And that might be annoying in some cases. Here you’ll find an easy way to disable these error emails.
There’s a fast and easy way to disable these error emails in WordPress. Here’s what you need to do:
Login to the FTP server you’re hosting your website, and open file wp-config.php . Most of the time you’ll find it in public_html or public directory.
Add this code -> define(‘WP_DISABLE_FATAL_ERROR_HANDLER’,true); anywhere in the config file.
Don’t forget to save changes and reupload updated file back to the FTP server.
Here how the file could look like:
That’s it – from now on you may break your site as much times as you want. WordPress won’t send error notification emails to your site’s admin email address.