This configuration enables or disables WordPress debug mode to display and log PHP errors for troubleshooting or hide them on live sites.
To SHOW errors (Enable Debug Mode + Log)
Use this when you are troubleshooting.
// Show errors
ini_set('display_errors','On');
ini_set('error_reporting', E_ALL);
define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);
Log file location:
/wp-content/debug.log
To HIDE errors (Disable Debug Mode)
Use this on live/production sites.
// Hide errors
ini_set('display_errors','Off');
ini_set('error_reporting', 0);
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', false);
Go to:
wp-content/debug.log
Open it to see all PHP / WordPress errors.