Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The intention of my pull request is to allow a database to be migrated over without a profile having to already exist on the system. For example, it will be possible to create an empty WordPress installation and initiate a DB pull using a connection string only. Particularly, this is useful to more easily provision new environments (stage, UAT, etc) through WP CLI.
I've made the existing profile argument optional and added new arguments for connection-string, action and create-backup. The 3 new arguments can be provided to create a type of "manual profile" with mostly default settings. It's possible to also include the profile id, which will take precedence over the manual profile.
The most significant changes are to the
command.php
file, which means the main part of the functionality as originally found inwpsdb-cli.php
pretty much works as it did before.I've been using these changes on my systems to more quickly setup new websites where profiles don't exist yet and I think it will be a useful addition that others may benefit from too. So, I hope you like it.