Solution:
As the Codex says:
WP_DEBUG_LOG
is companion toWP_DEBUG
that causes all errors to also be saved to adebug.log
log file inside the/wp-content/
directory. This is useful if you want to review all notices later or need to view notices generated off-screen (e.g. during an AJAX request orwp-cron
run).
Edit your wp-config.php
file and add the following definition (if not already present):
define('WP_DEBUG_LOG', true);
This will make WordPress log the errors to /wp-content/debug.log
.
However, if you want to change the location of the debug.log
file, you can use the following work-around:
if (defined('WP_DEBUG_LOG') && WP_DEBUG_LOG) {
ini_set( 'error_log', WP_CONTENT_DIR.'/foo/debug.log' ); //modify accordingly
}