config-command icon indicating copy to clipboard operation
config-command copied to clipboard

SET and DELETE don't work with `defined( 'DB_USER' ) or `define( 'DB_USER', 'wp' );`

Open janw-me opened this issue 4 years ago • 2 comments

I have a lot of sites setup where every constant is noted as below. This allows me to pre-include overrides for different environments.

defined( 'DB_USER' ) or define( 'DB_USER', 'wp' );

The SET and DELETE commands fail.

janw-me avatar Feb 17 '21 17:02 janw-me

PS I consider this low Priority, I've know this issue for at least 2 years. And I might try to fix this myself when I find time (the main reason for not reporting it sooner)

janw-me avatar Feb 17 '21 17:02 janw-me

wp config get seems to have the same problem https://github.com/wp-cli/config-command/issues/156

If anyone would like to create a PR, the solution will probably need to live in https://github.com/wp-cli/wp-config-transformer

danielbachhuber avatar Apr 17 '23 20:04 danielbachhuber