admin管理员组

文章数量:1134586

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?

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?

Share Improve this question asked Feb 18, 2021 at 18:12 NickNick 1272 silver badges9 bronze badges 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! – Buttered_Toast 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
Add a comment  | 

2 Answers 2

Reset to default 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.

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 );

本文标签: wp configWPDebug not displaying anything