1

In wp-config.php I have included:

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

As I understand, this should display certain information on every page, also if there are no errors. However, nothing has changed. In addition, no file public_html/debug.log has been generated...

Any idea how to get into debug mode?

2
  • Check with your hosting. by default php error are set to not be display for security reasons, you can ask them to turn them on, or better yet show you how to do it. Important! dont forget to turn off all php error when going live! Feb 18 at 18:28
  • 1
    The file should appear in the public_html/wp-content directory. For the same debug info and lots more, use this plugin: wordpress.org/plugins/query-monitor
    – shanebp
    Feb 18 at 19:14
2

The constant to output errors to screen is actually

define( 'WP_DEBUG_DISPLAY', true );

WP_DEBUG_LOG would generate a debug.log in your wp-content directory, not in your site root.

3
  • Thanks, the debug file is indeed there. I'm not sure what "The constant to output errors to screen is". But if I understand correctly, it is a hosting setting that is preventing from debugging info coming up on screen?
    – Nick
    Feb 18 at 19:48
  • 1
    If you add the WP_DEBUG_DISPLAY code I referenced to your wp-config.php, then errors would be output to the page. If there are no errors, you won't see any change. I'm not sure what other "certain information" you are looking for, but en-ca.wordpress.org/plugins/debug-bar can be useful.
    – vancoder
    Feb 18 at 19:52
  • Oh, I now understand (didn't realize that was an additional line to add)
    – Nick
    Feb 18 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.