2

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! Commented Feb 18, 2021 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
    Commented Feb 18, 2021 at 19:14

2 Answers 2

3

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.

4
  • 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
    Commented Feb 18, 2021 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
    Commented Feb 18, 2021 at 19:52
  • Oh, I now understand (didn't realize that was an additional line to add)
    – Nick
    Commented Feb 18, 2021 at 19:54
  • This doesn't work either
    – jjxtra
    Commented Feb 11, 2023 at 20:02
-1

You can control the setting by changing the following settings:

define ('WPLANG', 'da_DK');
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
1
  • This does the opposite of what the OP asked for. Commented Jul 25, 2023 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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