Support » Plugins and Hacks » [Resolved] "WARNING: WP_DEBUG is not enabled!"… when it is.

[Resolved] "WARNING: WP_DEBUG is not enabled!"… when it is.

  • I have this line in wp-config.php:

    But every time I run Theme Check, I get:

    WARNING: WP_DEBUG is not enabled! Please test your theme with debug enabled before you upload!

    I’ve tried deactivating all plugins, switching themes, checking different themes, etc.

    Any suggestions?


Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Simon Prosser


    Maybe you have the line commented out.

    Heres the code:

    if ( !defined( 'WP_DEBUG' ) || WP_DEBUG == false ) ....

    so if its not defined or false the message is displayed. if its set to true the message isnt displayed simple as that.

    It was not commented out, but I did find the problem.

    I dug around wp-config.php, and found that define('WP_DEBUG', false); was already in there for some reason, higher up in the file.

    I’d figure that setting it to true at the bottom of the file would have overridden that setting, but apparently it didn’t. Removing it from the bottom, and setting the first instance to true solved it.

    So while it was by no means a difficult fix, it wasn’t quite “simple as that”.

    Plugin Author Simon Prosser


    You can only define a constant once, you were probably filling your logs with php warnings abou it already being defined.

    I understand that now, I just didn’t realize it had already been defined.

    I do need to get better about remembering to check my logs. This isn’t the first time I’ve asked for help before doing so, and I always kick myself for it.

    Plugin Author Samuel Wood (Otto)


    WordPress.org Tech Dude

    Also, defines always go towards the top of the file. Putting them “at the bottom” won’t work.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] "WARNING: WP_DEBUG is not enabled!"… when it is.’ is closed to new replies.