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(‘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:

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.

Recommended hosting

Get your website online with Hostinger

WordPress, VPS, and domain hosting — fast, reliable, and beginner-friendly.

Blazing fast speed

LiteSpeed servers with global CDN

Free SSL & backups

Daily backups on every plan

1-click WordPress

Install in under a minute

VPS & cloud

Scale up when you need it

Affordable pricing

From €1.99/mo on long-term plans

Get hosting at Hostinger →

Use code IMAKEITWORK for an extra 10% off