Source: https://developer.wordpress.org/reference/functions/wp_debug_mode/
Add the following code to the wp-config.php file.
Remove it, or set to ‘false’ on production sites.
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments. Log file is saved to wp-content/debug.log
*/
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);Code language: PHP (php)
Notes
- 24-02-2023: the server log of several sites contained ‘already defined’ warnings, even with the function constants set to ‘false’. It looks like it comes from includes\default-constants.php (line 80+), so probably best to remove it entirely when not needed.