[wp-trac] [WordPress Trac] #64071: Site Health false positive: WP_DEBUG_LOG warning when debug.log is outside wp-content
WordPress Trac
noreply at wordpress.org
Sat Jan 3 14:52:12 UTC 2026
#64071: Site Health false positive: WP_DEBUG_LOG warning when debug.log is outside
wp-content
--------------------------+------------------------------
Reporter: dannythedog | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 6.8.3
Severity: minor | Resolution:
Keywords: 2nd-opinion | Focuses: administration
--------------------------+------------------------------
Comment (by dennishall):
Replying to [comment:2 westonruter]:
> Thanks for opening a ticket!
>
> To be fair, the Site Health message does say the file is
"''potentially'' available to all users".
>
> How would the test be able to reliably know whether the directory for
where the logs are written to is mounted somewhere publicly or not?
Why not just use the webroot path that WordPress is installed in?
I place ALL debug log files outside the webroot /var/www/ and the web
roots are all at /var/www/domain.com (sudo foldername used).
If the " define('WEBROOT_PATH', $_SERVER['DOCUMENT_ROOT'] . '/'); " is
present in wp-config.php, WordPress should be able to know the debug.log
file is outside that path.
WordPress also has the ABSPATH WordPress constant available even if you
don't use the WEBROOT_PATH.
Again, if the debug log is not located in or below that ABSPATH, why
should WordPress even display "potentially available to all users" when
it's outside the webroot?
I constantly have to let my customers know this is a WordPress bug in the
Site Health > Recommended Improvements logic and to disregard it.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64071#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list