The snippet below is for pasting into wp-config.php:
- to enable error logging into file debug.log, but move it outside of public_html
- to disable showing errors (you can switch comment below to allow display of errors)
// Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the debug.log file //define( 'WP_DEBUG_LOG', true ); ini_set( 'log_errors', 1 ); ini_set( 'error_log', __DIR__. '/../debug.log' ); // Disable display of errors and warnings //define( 'WP_DEBUG_DISPLAY', true ); //@ini_set( 'display_errors', E_ALL ); define( 'WP_DEBUG_DISPLAY', false ); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define( 'SCRIPT_DEBUG', true );