• Resolved baz74

    (@baz74)


    This is not directly your issue, but I thought you would know the answer.
    We are trying to debug an issue and are using two staging environments – using

    define( ‘WP_DEBUG_LOG’, true );

    But they are both writing results to the same file:  debug.log in the (live) content directory (usually wp-content/debug.log).

    How can we write to separate files (one in each of the staging environments).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor alaasalama

    (@alaasalama)

    Hi @baz74,

    Each staging site acts as a standalone WordPress site. To ensure they write to separate files, you should edit the wp-config.php file located inside each staging site’s root folder.

    To be 100% sure they go to different locations, you can define a specific path like this:

    define( 'WP_DEBUG_LOG', DIR . '/wp-content/debug.log' );

    Using DIR ensures the log is created relative to that specific staging site’s directory (e.g., /staging/wp-content/debug.log).

    Thanks,
    Alaa

    Thread Starter baz74

    (@baz74)

    Big thank you for replying so quickly

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.