Title: Debug Widget and false positives
Last modified: January 5, 2023

---

# Debug Widget and false positives

 *  Resolved [Website Rob](https://wordpress.org/support/users/website-rob/)
 * (@website-rob)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/)
 * Greetings,
 * Hoping you can help me with a slight problem I’m having.
 * When I enable the Debug Log Widget, the widget only seems to work if using the
   WP default location: `/wp-content/debug.log`
 * That will kick off a Warning in Site Health so thought I’d move it like so.
 * Edit the wp-config.php with the following:
 * `define('WP_DEBUG', true);
   define('WP_DEBUG_LOG', true);define('WP_DEBUG_DISPLAY',
   false);define('WP_DEBUG_LOG', '/somewhere/debug.log');
 * The [WP Support Docs](https://wordpress.org/support/article/debugging-in-wordpress/#wp_debug_log)
   say the above is allowed, which does not appear to be true as Site Health still
   disapproves. Even if in a protected area.
 * Or could I use `define('WP_DEBUG_LOG', '/home/$Username/debug.log');` which would
   definitely be secure. Mind you, I don’t know if an absolute path can be used 
   in wp-config.php. Yes | No ?
 * As the Error Log Widget allows for providing an absolute path to the Error Log
   Location, would updating your plugin to do the same for Debug Log Widget help
   solve the above? Or would that leave other Plugins wondering where the ‘debug.
   log’ went to?
 * Setting up a declaration in .htaccess to limit access wherever I put it, I can
   do, but not sure if it would be picked up by WP.
 * Did I miss something, am I whistling Dixie here or is the above just one of those
   situations one has to live with? (Site Health + false positive = bad)
    -  This topic was modified 3 years, 5 months ago by [Website Rob](https://wordpress.org/support/users/website-rob/).

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

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16344102)
 * Glad to help.
 * I am not seeing any errors reported via Site Health. Running only DWS and using
   default settings. What is the specific error you’re getting?
 *  Thread Starter [Website Rob](https://wordpress.org/support/users/website-rob/)
 * (@website-rob)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16346323)
 * Create /wp-content/debug.log and enable Debug in in DWS.
 * DWS reports no problem nor does Site Health but is Debug actually working? I 
   don’t know. Will debug within DWS work without having to enable it in wp-config.
   php?
 * WP Docs say debug must be enabled in wp-config.php it order to work and once 
   that is done Site Health says: _The value, `WP\_DEBUG\_LOG`, has been added to
   this website’s configuration file. This means any errors on the site will be 
   written to a file which is potentially available to all users._
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16346659)
 * Correct, `/wp-content/debug.log` is the default location of the debug log. So
   yeah it definitely works.
 * “Will debug within DWS work without having to enable it in wp-config.php?”
 * No, debug log must be enabled for it to work.
 *  Thread Starter [Website Rob](https://wordpress.org/support/users/website-rob/)
 * (@website-rob)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16346706)
 * And that takes use back to the original post.
 * If Debug is enabled in wp-config.php then Site Health will say there is a problem–
   even if ‘debug.log’ is protected by other means or stored somewhere else. So 
   then, as outlined in original post, is it possible to recode DWS Debug to use
   a custom path, similar to the same option as the DWS Error Log?
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16346992)
 * So you’re asking how to change the debug path? 
   Use the provided hook, for example:
 *     ```wp-block-code
       function dashboard_widgets_suite_log_debug_path($log) {
   
       	return '/whatever/path/debug.log'; 
   
       }
       add_filter('dashboard_widgets_suite_log_debug_path', 'dashboard_widgets_suite_log_debug_path');
       ```
   
 *  Thread Starter [Website Rob](https://wordpress.org/support/users/website-rob/)
 * (@website-rob)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16347001)
 * Although your code would probably work, I have no idea what file to edit.
 * I was hoping that if it was possible, the next or future update of DWS would 
   include the ability to manually insert a Log Location, such as the DWS Error 
   log does.
 * I guess you did answer the question though.
 * Thanks
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16347024)
 * Here is a guide that explains [how to add custom code to WordPress](https://digwp.com/2022/02/custom-code-wordpress/).
   Basically you can add via theme or simple plugin.

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

The topic ‘Debug Widget and false positives’ is closed to new replies.

 * ![](https://ps.w.org/dashboard-widgets-suite/assets/icon-256x256.png?rev=1471944)
 * [Dashboard Widgets Suite](https://wordpress.org/plugins/dashboard-widgets-suite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dashboard-widgets-suite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dashboard-widgets-suite/)
 * [Active Topics](https://wordpress.org/support/plugin/dashboard-widgets-suite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dashboard-widgets-suite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dashboard-widgets-suite/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/debug-widget-and-false-positives/#post-16347024)
 * Status: resolved