Just released: My new WP-CLI command for quickly backing up currently installed plugins and themes. It works like this:

$ wp plugin backup <plugin-slug>
# OR
$ wp theme backup <theme-slug>

Running either of the above would yield:

<plugin-slug>_<version>.zip
# OR
<theme-slug>_<version>.zip

I built the command because I’m always finding myself doing the same thing manually whenever I want to test out a theme or plugin update from the command line.

In addition to attempting to create a ZIP on your server, it falls back to using TAR if zip isn’t installed.

If you’d like to try out my command, you can install it via:

$ wp package install mwender/wp-backup-command