How to disable error emails in WordPress

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.

How to disable “The site is experiencing technical difficulties” email in WordPress

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(‘WPDISABLEFATALERRORHANDLER’,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:

wordpress how to disable error emails

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.

Hostinger Black Friday deals