• I’ve taken over a WordPress system I didn’t develop myself, and there are a couple of little issues I can’t figure out.

    I can’t seem to get logging working. I have the following in wp-config.php:
    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    But no log file is written. Is there some other setting which may be preventing this?

    • This topic was modified 1 year, 6 months ago by johnny2r.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter johnny2r

    (@johnny2r)

    This was a pretty stupid one in the end. I took another look at wp-config.php and noticed that the commands to define WP_DEBUG etc. were at the end of the file, after the ‘/* That’s all, stop editing! Happy publishing. */’ line and the code below that, so WordPress was loading before the lines were reached.

    Hello @johnny2r

    You can also use this:-

    define( 'WP_DEBUG', true);
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'WP_DEBUG_LOG', '/tmp/wp-errors.log' );
    define( 'WP_DEBUG_LOG', true );
    • This reply was modified 1 year, 6 months ago by niyaswp.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can’t get debug.log working’ is closed to new replies.