Force disable WordPress error reporting

January 5, 2021Snippets, WordPress

Why force disable WordPress error reporting?

Many a times, you will see that WordPress is showing errors in the frontend or backend and breaking parts of the website even though you have WP_DEBUG set to false. And here appears the time to force disable WordPress error or warning reporting because doing so, will fix the site breaking issues as well automatically.

 

Simply go to your WordPress installation directory and open the wp-config.php file. Find the line that says, “/* That’s all, stop editing! Happy publishing. */” and add the below code above the line.

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Congratulations! You have force disabled the unwanted error or warning reporting in WordPress.
Get more helpful code snippets for your WordPress site here

Leave a Reply

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

Subscribe Now to get 70% Off launch coupon!

MS Web Arts will be launching on 1st May 2021. You will get up to 70% off and the latest product updates when we launch. This is subscribers only. Don’t miss out!