I need to create debug.log, but for some reason it was not created.
Things I’ve tried:
- Installing plugin that should allow logging, to create history of my problems.
- editing wp-config.php with debug lines:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
I hope it ends well 😀
2
Answers
There must have been a permissions error that prevented writing a log file to
/tmp/
.Use
to let WordPress write the default Debug.log file to
/wp-content/
.Before enabling debugging in WordPress, try manually creating the log file /tmp/wp-errors.log with write permissions for the web server user.
touch /tmp/wp-errors.log
chmod 666 /tmp/wp-errors.log
This will ensure that WordPress can write to the log file.