wp-cli / config-command

Generates and reads the wp-config.php file.
MIT License
38 stars 36 forks source link

[ wp config set WP_DEBUG false --raw –no-add ] - –no-add doesn't override #178

Closed riccardodicurti closed 8 months ago

riccardodicurti commented 9 months ago

I have in my wp-config.php define( 'WP_DEBUG', true ); and I tried to run the following command wp config set WP_DEBUG false --raw -no-add but unfortunately it does not change the value of WP_DEBUG.

ernilambar commented 8 months ago

I tried to reproduce the issue but could not. Can you please share more info? Output of wp cli info will be helpful. If possible please share the config file redacting private information if any.

riccardodicurti commented 8 months ago

@ernilambar I have to apologize, I was launching the command with only one - ( -no-add ) instead of two ( --no-add ) and this returned error.

Maybe the documentation needs to be updated?

[--add] Add the value if it doesn’t exist yet. This is the default behavior, override with –no-add.

ernilambar commented 8 months ago

Hmm. It is correct in the PHP file. https://github.com/wp-cli/config-command/blob/main/src/Config_Command.php#L595-L597 It will be fixed in the documentation when handbook pages are regenerated.