iandunn / wp-cli-rename-db-prefix

A WP-CLI command to rename WordPress' database prefix
107 stars 18 forks source link

Skip wp-config.php changes with flag --skip-wp-config #3

Open TeemuSuoranta opened 7 years ago

TeemuSuoranta commented 7 years ago

Hi!

Thanks for a great command. I would like to have a way to skip changes to wp-config.php because the command may (and has) had some problems if the prefix is defined with .env file or similar. The easiest way could be adding flag --skip-wp-config in the end of the command that would not make any changes to wp-config.php.

Can this be done? I might be able to help with PR when I have time.

iandunn commented 7 years ago

I think that's a good idea, but I doubt I'd ever have time to implement it myself. Finding time to review/tweak a PR is difficult, too, so forking may be a better option. I'll leave this open just in case I do find time, though.

TeemuSuoranta commented 7 years ago

Thanks for a quick answer. This is a low priority enhancement and you can get by changing the wp-config.php temporarily before running the command and then replacing the $table_prefix part back as it was (with new prefix).