How to enable Debug in WordPress
WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout WordPress.
It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress.
define( 'WP_DEBUG', true ); define( 'WP_DEBUG', false );
The true and false values in the example are not surrounded by apostrophes (‘) because they are Boolean (true/false) values. If you set constants to ‘false’, they will be interpreted as true because the quotes make it a string rather than a Boolean.
It is not recommended to use WP_DEBUG or the other debug tools on live sites, they are meant for local testing and staging installs.
Leave a Reply