wp-cli commands

Install an old plugin version

Roll back to a previous plugin version

Search replace

Get an option

Create db dumps without sensitive data

SQL import

Jetpack problems

Changing password

Canonical docs: https://developer.wordpress.org/cli/commands/

Install an old plugin version

wp --skip-plugins --skip-themes plugin install SLUG --version=VERSION --force

Roll back to a previous plugin version

wp --skip-plugins --skip-themes plugin update <plugin-slug> --version=<target-version>

Search replace

$ wp search-replace micro.cagrimmett.com cagrimmett.com --dry-run
$ wp cache flush

Don’t be a dummy. Use --dry-run first.

Get an option

wp option get <option_name>

Create db dumps without sensitive data

https://github.com/Dan0sz/strip-db-dump

SQL import

wp db import dump.sql

Jetpack problems

wp option delete jetpack_options jetpack_private_options
p option delete jetpack_licenses
wp jetpack disconnect blog
wp jetpack disconnect user cagrimmett

Changing password

wp user update cagrimmett --user_pass=PASSWORD