Last active
October 26, 2018 15:21
-
-
Save sebastianmoran-mainwp/af324dc7633843c733c77077a871f73c to your computer and use it in GitHub Desktop.
Common and handy WP-CLI commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp plugin list | |
wp plugin deactivate --all | |
wp plugin install contact-form-7 --version=5.0.3 --force | |
wp theme active twentyseventeen | |
wp theme install astra --active | |
wp db export | |
wp db reset --yes | |
wp db import filename.sql | |
wp db size | |
wp db size --tables | |
wp db optimize | |
wp search-replace ‘http://example.com’ ‘https://example.com’ --recurse-objects --skip-columns=user_email,guid --all-tables --dry-run | |
wp search-replace ‘https://example.com’ ‘https://domain.com’ --recurse-objects --skip-columns=user_email,guid --all-tables --dry-run | |
wp search-replace ‘http://example.com’ ‘https://example.com’ --recurse-objects --skip-columns=user_email,guid --all-tables | |
wp search-replace ‘https://example.com’ ‘https://domain.com’ --recurse-objects --skip-columns=user_email,guid --all-tables | |
wp cache flush | |
wp rewrite flush | |
wp transient delete --expired | |
wp transient delete --all | |
wp option update classic-editor-replace replace --skip-themes --skip-plugins | |
wp comment delete $(wp comment list --status=spam --format=ids) | |
wp mainwp sync --all | |
wp mainwp plugin --upgrade-all | |
wp mainwp theme --upgrade-all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://developer.wordpress.org/cli/commands/plugin/list/
https://developer.wordpress.org/cli/commands/plugin/deactivate/
https://developer.wordpress.org/cli/commands/plugin/install/
https://developer.wordpress.org/cli/commands/theme/activate/
https://developer.wordpress.org/cli/commands/theme/install/
https://developer.wordpress.org/cli/commands/db/export/
https://developer.wordpress.org/cli/commands/db/reset/
https://developer.wordpress.org/cli/commands/db/import/
https://developer.wordpress.org/cli/commands/db/size/
https://developer.wordpress.org/cli/commands/db/optimize/
https://developer.wordpress.org/cli/commands/search-replace/
https://developer.wordpress.org/cli/commands/cache/flush/
https://developer.wordpress.org/cli/commands/rewrite/flush/
https://developer.wordpress.org/cli/commands/transient/delete/
https://developer.wordpress.org/cli/commands/option/update/
https://mainwp.com/help/docs/wp-cli-commands/