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