WordPress Debug Mode
====================================================================================
WordPress Debug Mode
WordPress comes with a built-in debugging feature, with a few options we can set for viewing debug logs.
All of these changes are made within the wp-config.php file -
NOTE: You must insert this BEFORE /* That's all, stop editing! Happy blogging. */ in the wp-config.php file.
Enable debug mode with standard debug log output on website (shows any debug errors on the website itself by default)
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
Change WP_DEBUG display method on site: - Prevents debug errors from being displayed on the website itself:
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
Set WP-DEBUG log file:
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
====================================================================================
No Comments