Turn on debug in wordpress – by default spools errors to the screen

Turn on debug in wordpress – by default spools errors to the screen when set to “true”.
in the main configuration file wp-config.php change “define(‘WP_DEBUG’, false);” to “define(‘WP_DEBUG’, true);”.
Can be a security concern as all users see the messages… turn it off at your earliest convenience.
A couple more debug features exist as follows:
WP_DEBUG_LOG
WP_DEBUG_LOG works with to WP_DEBUG that causes all errors to also be saved to a debug.log. The debug log file is located inside the ./wp-content/ directory.
This is useful for historical review of all notices.
This feature uses PHP’s built in error_log() function, which can be useful for instance when debugging AJAX events.
define( ‘WP_DEBUG_LOG’, true );
Note: for WP_DEBUG_LOG to work, WP_DEBUG must be enabled (true).
Remember you can turn off WP_DEBUG_DISPLAY independently. All three WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY are set to either true or false.
 

Leave a Comment

Scroll to Top