Simple WP-CLI backup and restore

It would be neat if WP-CLI included a rudimentary backup and restore process for this use case:

richard.tape [8:19 AM] anyone used wocker? I’m looking to set up a dev environment that I can share with someone else so they’re able to more easily help me debug a problem and I want to modify the base containers and then package the whole thing up so I can just pass that to them and they just spin it up and are in the same shape I’m in… ideas?

wp backup would create a tarball of the database, WordPress files, and (optionally) the uploads directory. wp restore could then read said tarball, and expand it to a working WordPress install.

We could even potentially parse the original wp-config.php into a manifest file, which would permit the restoration process to override some details.

Leave a Reply

Your email address will not be published. Required fields are marked *