iandunn / wp-cli-rename-db-prefix

A WP-CLI command to rename WordPress' database prefix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

TeemuSuoranta opened this issue · comments

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.

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.

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).