Home » WordPress » How to disable error emails in WordPress

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.

Best WordPress hosting 2024

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.

Tags:

Fathom analytics - privacy focused cookie-free website analytics

Most popular tutorials


Get our latest WordPress news and special offers from RockSolidWP!

Only useful WordPress and WooCommerce tips and tricks and exclusive offers for our readers once a month. No marketing nonsense.

Looking for reliable yet affordable WordPress hosting?
Hostinger is the way to go!

Get 10% OFF by using code IMAKEITWORK