Answered by : elated-elephant-dsfrbf32z4kd
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );
Source : https://wordpress.org/support/article/debugging-in-wordpress/ | Last Update : Fri, 03 Apr 20
Answered by : eswaran-m
//You can enable WordPress logging adding this to wp-config.php file
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
Source : | Last Update : Sun, 06 Dec 20
Answered by : gtamborero
// inside wp-config.php
@ini_set( 'log_errors', 'On' );
@ini_set( 'display_errors', 'On' );
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'SCRIPT_DEBUG', true );
define('SAVEQUERIES', true);
Source : | Last Update : Tue, 05 Oct 21
Answered by : brainy-butterfly-akce3sh5axff
define( 'WP_DEBUG', true );
Source : | Last Update : Fri, 26 Feb 21
Answered by : adventurous-alligator-inpliidfbzvn
error_log( print_r( 'Hello World!', true ) );
Source : https://stackoverflow.com/questions/24330039/how-can-i-use-error-log-with-wordpress | Last Update : Sat, 01 Aug 20
Answered by : gtamborero
{"tags":[{"tag":"p","content":"This function can be called to display complex data inside \/wp-content\/debug.log"},{"tag":"textarea","content":"\/\/ Easy error log for WordPress\nfunction wpError($var){\n error_log(print_r($var, true));\n}\n\n\/\/ Example of use: \nwpError(get_current_user_id());","code_language":"php"}]}
Source : | Last Update : Wed, 29 Mar 23
Answered by : adventurous-alligator-inpliidfbzvn
error_log( 'Hello World!' );
Source : https://stackoverflow.com/questions/24330039/how-can-i-use-error-log-with-wordpress | Last Update : Sat, 01 Aug 20
Answered by : you
define( 'WP_DEBUG', false );
Source : | Last Update : Tue, 19 Sep 23