WPIntell

Source evidence

wp-config.php not getting altered

WP Debugging · support · 2022-03-19T17:29:00+00:00

mixedsentiment
highseverity
0.95relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 35 rows with source links

17.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
parakeet resolved
Is this plugin suppose to write the DEBUG settings to wp-config.php? That’s not happening. My wp-config.php and WP are local on my Mac, running on LocalWP, a MAMP-like environment. File: Get Info Me: Read & Write Staff: Read only Everyone: Read only If I change Everyone to Read & Write, still the plugin doesn’t write the wp-config.php What should I do? I develop this plugin in LocalWP so it absolutely works in this environment. Can you post the section of your wp-config.php that contains the defines? What settings do you have that aren’t being written? The plugin must remain active or the settings and wp-config.php should revert back to its previous state. I’ve seen you on the forum. “Contains the defines”? That’s my question… The language of your plugin settings page suggests the plugin writes the defines to my wp-config.php. Is that right? Because I don’t see anything getting written to it. The only time it works is when I manually write the define-debug lines in. Based on checkboxes… [X] Set WP_DEBUG to true. [ ] Set WP_DEBUG_DISPLAY to false, default is true. [ ] Set WP_DISABLE_FATAL_ERROR_HANDLER to true. … the plugin tells me it will set… define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'SAVEQUERIES', true ); But saving changes doesn’t result in this being written to wp-config.php. It should probably also be setting the DEBUG_DISPLAY to true, but that doesn’t get previewed under Debugging Constants (as you can see from the above). Thanks. Is there an error in your debug.log? Here’s what I get when I create a new site in LocalWP v6.3.1 and install and activate WP-Debugging. https://pasteboard.co/ISwqGwVs7EFl.png Also WP_DEBUG was set to true by LocalWP This reply was modified 4 years, 2 months ago by Andy Fragen . debug.log hasn’t written anything since March 15. Which is odd, since, earlier today, I broke something on purpose and the site displayed… well, it was kind of an elaborate PHP box/table, rather than a one-line PHP read-out… stack-trace/xdebug, I guess. I just manually added in… define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_DISPLAY’, true ); define( ‘WP_DEBUG_LOG’, true ); I just broke the thing again and, this time, it both echoes the error box and wrote the stack-trace to debug.log. So that shows debug.log is now writing… So, any errors when I perform WP-Debugging actions… ? No In the plugin screen, I check/uncheck box combos and save. The lines destined for writing get updated in the preview box, but a) nothing is added to debug.log and b) … Hang on… now, when I check/uncheck those boxes, I do see wp-config.php getting amended in real-time. I guess it works then. I’m curious… With WP_DEBUG_DISPLAY true/default, what kinds of output should display versus the stacktrace box, which seems much more detailed? Does presence of the stacktrace box override WP debug display? Can’t remember how/whether I enabled that PHP box in LocalWP; I don’t have any LocalWP add-ons. Is that the standard verbosity for debug expression in LocalWP? This reply was modified 4 years, 2 months ago by parakeet . This reply was modified 4 years, 2 months ago by parakeet . This reply was modified 4 years, 2 months ago by parakeet . A standard stack trace doesn’t override anything. By default WP_DEBUG_DISPLAY is true. Having WP_DEBUG set to true causes the error to then show.

Comments

5 shown
Andy Fragen 2022-03-19T18:38:00+00:00

I develop this plugin in LocalWP so it absolutely works in this environment. Can you post the section of your wp-config.php that contains the defines? What settings do you have that aren’t being written? The plugin must remain active or the settings and wp-config.php should revert back to its previous state.

parakeet 2022-03-19T20:29:00+00:00

I’ve seen you on the forum. “Contains the defines”? That’s my question… The language of your plugin settings page suggests the plugin writes the defines to my wp-config.php. Is that right? Because I don’t see anything getting written to it. The only time it works is when I manually write the define-debug lines in. Based on checkboxes… [X] Set WP_DEBUG to true. [ ] Set WP_DEBUG_DISPLAY to false, default is true. [ ] Set WP_DISABLE_FATAL_ERROR_HANDLER to true. … the plugin tells me it will set… define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'SCRIPT_DEBUG', true ); define( 'SAVEQUERIES', true ); But saving changes doesn’t result in this being written to wp-config.php. It should probably also be setting the DEBUG_DISPLAY to true, but that doesn’t get previewed under Debugging Constants (as you can see from the above). Thanks.

Andy Fragen 2022-03-19T20:48:00+00:00

Is there an error in your debug.log? Here’s what I get when I create a new site in LocalWP v6.3.1 and install and activate WP-Debugging. https://pasteboard.co/ISwqGwVs7EFl.png Also WP_DEBUG was set to true by LocalWP This reply was modified 4 years, 2 months ago by Andy Fragen .

parakeet 2022-03-19T21:05:00+00:00

debug.log hasn’t written anything since March 15. Which is odd, since, earlier today, I broke something on purpose and the site displayed… well, it was kind of an elaborate PHP box/table, rather than a one-line PHP read-out… stack-trace/xdebug, I guess. I just manually added in… define( ‘WP_DEBUG’, true ); define( ‘WP_DEBUG_DISPLAY’, true ); define( ‘WP_DEBUG_LOG’, true ); I just broke the thing again and, this time, it both echoes the error box and wrote the stack-trace to debug.log. So that shows debug.log is now writing… So, any errors when I perform WP-Debugging actions… ? No In the plugin screen, I check/uncheck box combos and save. The lines destined for writing get updated in the preview box, but a) nothing is added to debug.log and b) … Hang on… now, when I check/uncheck those boxes, I do see wp-config.php getting amended in real-time. I guess it works then. I’m curious… With WP_DEBUG_DISPLAY true/default, what kinds of output should display versus the stacktrace box, which seems much more detailed? Does presence of the stacktrace box override WP debug display? Can’t remember how/whether I enabled that PHP box in LocalWP; I don’t have any LocalWP add-ons. Is that the standard verbosity for debug expression in LocalWP? This reply was modified 4 years, 2 months ago by parakeet . This reply was modified 4 years, 2 months ago by parakeet . This reply was modified 4 years, 2 months ago by parakeet .

Andy Fragen 2022-03-19T21:37:00+00:00

A standard stack trace doesn’t override anything. By default WP_DEBUG_DISPLAY is true. Having WP_DEBUG set to true causes the error to then show.