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
# Search and replace a custom table and core table | |
wp search-replace "old-string" "new-string" wp_custom_table wp_posts | |
# Search and replace all tables, including custom tables | |
wp search-replace "old-string" "new-string" --all-tables |
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
# Check number of times string will be replaced | |
wp search-replace "http://olddomain.com" "http://newdomain" --dry-run | |
# Replace old domain with new domain | |
wp search-replace "http://olddomain.com" "http://newdomain.com" | |
# Update URL to https | |
wp search-replace "http://example.com" "https://example.com" |
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 core update --version=4.6.1 --force |
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
# Activate a theme | |
wp theme activate twentyseventeen | |
# Delete a deactivated theme | |
wp theme delete twentysixteen | |
# Disable a theme on a multisite network | |
wp theme disable twentysixteen | |
# Enable a theme on a multisite network |
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
# Deactivate a plugin | |
wp plugin deactivate hello-dolly | |
# Deactivate and uninstall a plugin | |
wp plugin deactivate hello-dolly --uninstall | |
# Uninstall a previously deactivated plugin | |
wp plugin uninstall hello-dolly | |
# Deactivate all plugins |
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
# Check for plugin updates | |
wp plugin list | |
# Check which plugins WP-CLI can update | |
wp plugin update --all --dry-run | |
# Update all plugins | |
wp plugin update --all | |
# Update a single plugin |
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
# Check for theme updates | |
wp theme list | |
# Check which themes WP-CLI can update | |
wp theme update --all --dry-run | |
# Update all themes | |
wp theme update --all | |
# Update one theme |
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 install wp-smushit custom-sidebars |
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 search smush |
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 |
NewerOlder