skip to Main Content

I need to create debug.log, but for some reason it was not created.

Things I’ve tried:

  1. Installing plugin that should allow logging, to create history of my problems.
  2. 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


  1. There must have been a permissions error that prevented writing a log file to /tmp/.

    Use

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true);
    define( 'WP_DEBUG_DISPLAY', false );
    

    to let WordPress write the default Debug.log file to /wp-content/.

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search