# WP-Config - invalid values for WP\_DEBUG defines

**URL:** https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126
**Category:** Bug Reports
**Created:** [January 19, 2021, 4:03pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126 "2021-01-19T16:03:50Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![onebigidea](https://avatars.discourse-cdn.com/v4/letter/o/df705f/32.png) [@onebigidea](https://community.kinsta.com/u/onebigidea)
#### Post date: [January 19, 2021, 4:03pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/1 "2021-01-19T16:03:50Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
\*\*A: 19 Jan 2021 11am

**Q: DevKinsta Version**  
\*\*A: 1.0.1

**Q: OS Version**  
\*\*A: Mac OS X 10.15.7 (Catalina)

**Q: Docker Desktop Version**  
\*\*A: 3.1.0

**Q: Were any error codes or messages observed? If so, what were they?**  
\*\*A: None

**Q: Detailed Description of the Problem**  
\*\*A: Value of WP\_DEBUG\_DISPLAY ignored.  
The values entered by default are strings (i.e. quoted) not Boolean -  
these are the correct values:  
define( ‘WP\_DEBUG’, true );  
define( ‘WP\_DEBUG\_LOG’, true );  
define( ‘WP\_DEBUG\_DISPLAY’, false );

[![](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/c20ceb34a086c9c2f58f9250fa58415db26994a8.png) ](https://dl.dropboxusercontent.com/s/sh0iyk9afkql09d/Screen%20Shot%202021-01-19%20at%2011.02.22%20AM.png?dl=0)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [January 19, 2021, 4:29pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/2 "2021-01-19T16:29:37Z")

</div>

Good catch! Thanks for reporting.

---

<div class="post-metadata">

### Author: ![aidenberzins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/aidenberzins/32/260_2.png) [@aidenberzins](https://community.kinsta.com/u/aidenberzins)
#### Post date: [February 10, 2021, 2:39am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/3 "2021-02-10T02:39:02Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:** Feb 9 2021 - 7:36PM MST

**Q: DevKinsta Version**  
**A:** Latest

**Q: OS Version**  
**A:** Windows 10

**Q: Docker Desktop Version**  
**A:**

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** Debugging is showing even though WP\_DEBUG is off.

**Q: Detailed Description of the Problem**  
**A:** On one of my pages debugging messages are still appearing despite WP\_DEBUG being false.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/b04eb12f569b3a407af6b03be2ca975103af3d05.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/0141527b6ec371d91b8ca8da13971043cb42716b.png)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [February 10, 2021, 4:11pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/4 "2021-02-10T16:11:26Z")

</div>

Hi @aidenberzins . Would you happen to have `WP_DEBUG` inserted anywhere else? Perhaps in your themes `function.php` file?

---

<div class="post-metadata">

### Author: ![aidenberzins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/aidenberzins/32/260_2.png) [@aidenberzins](https://community.kinsta.com/u/aidenberzins)
#### Post date: [February 10, 2021, 5:29pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/5 "2021-02-10T17:29:52Z")

</div>

No, it is not defined elsewhere. I did an entire file search.

---

<div class="post-metadata">

### Author: ![aidenberzins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/aidenberzins/32/260_2.png) [@aidenberzins](https://community.kinsta.com/u/aidenberzins)
#### Post date: [February 10, 2021, 5:38pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/6 "2021-02-10T17:38:03Z")

</div>

It appears when you toggle the switch the  
_wp-config.php_ is either all `true` or all `false`.

But when the settings are as follows the errors no longer display on the front end.

```auto
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

```

---

<div class="post-metadata">

### Author: ![aidenberzins](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/aidenberzins/32/260_2.png) [@aidenberzins](https://community.kinsta.com/u/aidenberzins)
#### Post date: [February 10, 2021, 6:34pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/7 "2021-02-10T18:34:19Z")

</div>

So when you toggle between it appears to change the value to strings rather than booleans. So this does seem to be a bug.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [February 10, 2021, 10:51pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/8 "2021-02-10T22:51:36Z")

</div>

Thanks for reporting this! It does appear to be a bug. I’ll let you know when this is solved 🙂

---

<div class="post-metadata">

### Author: ![Ryan\_Faria](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/ryan_faria/32/371_2.png) [@Ryan\_Faria](https://community.kinsta.com/u/Ryan_Faria)
#### Post date: [March 22, 2021, 4:18am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/9 "2021-03-22T04:18:11Z")

</div>

I had same issue as @aidenberzins . I turned the debug switch off, however, debug messages were still showing. To fix: in wp-includes/load.php on line 450: change ini\_set( ‘display\_errors’, 1 ); TO ini\_set( ‘display\_errors’, 0 ); in order to remove the debug messages. ![Screenshot 2021-03-22 001744](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/1X/f726de3f691b53bec08465e8beb8065c01cffdb2.png)

---

<div class="post-metadata">

### Author: ![onebigidea](https://avatars.discourse-cdn.com/v4/letter/o/df705f/32.png) [@onebigidea](https://community.kinsta.com/u/onebigidea)
#### Post date: [March 22, 2021, 2:21pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/10 "2021-03-22T14:21:18Z")

</div>

NOTE - The issue has to do with invalid values in the define for WP\_DEBUG - the quoted string 'true" or ‘false’ evaluates as true - you need to remove the quotes for the values to be corrected evlauated.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [March 22, 2021, 4:44pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/11 "2021-03-22T16:44:25Z")

</div>

For those experiencing this issue, be sure to replace your wp-config.php values with the following:

```auto
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

```

---

<div class="post-metadata">

### Author: ![Andrew\_Fair](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andrew_fair/32/396_2.png) [@Andrew\_Fair](https://community.kinsta.com/u/Andrew_Fair)
#### Post date: [May 28, 2021, 2:02am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/12 "2021-05-28T02:02:38Z")

</div>

Hey Michael,

I know it may not be helpful but simply removing the tags altogether works fine. Why not instead of changing them to false DevKinsta simply removes all 3? I simply remove all 3 and the problem is solved as well.

P.S. I came here to ensure this bug was posted.

Best regards,  
Andrew

---

<div class="post-metadata">

### Author: ![VeVas](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/vevas/32/414_2.png) [@VeVas](https://community.kinsta.com/u/VeVas)
#### Post date: [June 14, 2021, 8:08am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/13 "2021-06-14T08:08:12Z")

</div>

I’m experiencing the same issue.

WP\_DEBUG turns on in the GUI, messages shows, all OK. Turning it off in the GUI does not work.

Workaround – Turning the WP\_DEBUG off with WP CLI works:

```auto
wp config set WP_DEBUG false --raw

```

---

<div class="post-metadata">

### Author: ![Andrew\_Fair](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andrew_fair/32/396_2.png) [@Andrew\_Fair](https://community.kinsta.com/u/Andrew_Fair)
#### Post date: [October 14, 2021, 11:51am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/14 "2021-10-14T11:51:13Z")

</div>

Certainly can and removing it altogether works just as well. 👍🕶 It’s optional

---

<div class="post-metadata">

### Author: ![andreasaptum](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andreasaptum/32/740_2.png) [@andreasaptum](https://community.kinsta.com/u/andreasaptum)
#### Post date: [October 14, 2021, 10:58am UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/15 "2021-10-14T10:58:00Z")

</div>

**Q: Date/Time this occurred (Provide your time zone also)**  
**A:**

**Q: DevKinsta Version**  
**A:** 2.2.0

**Q: OS Version**  
**A:** macOS Big Sur

**Q: Docker Desktop Version**  
**A:** 4.1.1

**Q: Were any error codes or messages observed? If so, what were they?**  
**A:** No

**Q: Detailed Description of the Problem**  
**A:**

When activating WP\_DEBUG from DevKinsta UI, it is turned on, but when deactivating the settings returned to wp\_config.php file is added with strings instead of f boolean, so the setting is not interpreted.

It works again if you change the settings from:  
define( ‘WP\_DEBUG’, ‘false’ );  
define( ‘WP\_DEBUG\_LOG’, ‘false’ );  
define( ‘WP\_DEBUG\_DISPLAY’, ‘false’ );  
to this:  
define( ‘WP\_DEBUG’, false );  
define( ‘WP\_DEBUG\_LOG’, false );  
define( ‘WP\_DEBUG\_DISPLAY’, false );

This issue (and fix!) was first reported on the 19th of January here: [WP-Config - invalid values for WP\_DEBUG defines - #12 by Andrew\_Fair](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/12)

Why is this change not implemented yet??

Regards,  
Andreas  
Aptum

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [October 14, 2021, 2:14pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/16 "2021-10-14T14:14:54Z")

</div>

Welcome to DevKinsta @andreasaptum ! I’ve merged your post with this one here to consolidate the same report. I’m sorry for the issue here. We’re aware of the issue and will provide an update here as soon as this is resolved.

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [November 10, 2021, 2:28pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/17 "2021-11-10T14:28:27Z")

</div>

Hi everyone! The latest version of DevKinsta 2.3.0 has resolved this bug. Thank you everyone for reporting this! Here’s more information on this update: [DevKinsta Releases (Minor) - #7 by michael](https://community.kinsta.com/t/devkinsta-releases-minor/371/7)

---

<div class="post-metadata">

### Author: ![michael](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/michael/32/31_2.png) [@michael](https://community.kinsta.com/u/michael)
#### Post date: [November 10, 2021, 2:28pm UTC](https://community.kinsta.com/t/wp-config-invalid-values-for-wp-debug-defines/126/18 "2021-11-10T14:28:33Z")

</div>


