WordPress.org

Ready to get started?Download WordPress

Forums

Theme-Check
[resolved] "WARNING: WP_DEBUG is not enabled!"... when it is. (6 posts)

  1. catnip216
    Member
    Posted 1 year ago #

    I have this line in wp-config.php:
    define('WP_DEBUG',true);

    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?

    http://wordpress.org/extend/plugins/theme-check/

  2. Simon Prosser
    Theme Review Admin
    Plugin Author

    Posted 1 year ago #

    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.

  3. catnip216
    Member
    Posted 1 year ago #

    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".

  4. Simon Prosser
    Theme Review Admin
    Plugin Author

    Posted 1 year ago #

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

  5. catnip216
    Member
    Posted 1 year ago #

    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.

  6. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year ago #

    Also, defines always go towards the top of the file. Putting them "at the bottom" won't work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.