Last active
December 4, 2023 05:25
-
-
Save deanoakley/77cad07f3afea4ab96fa6c1ea7c865d1 to your computer and use it in GitHub Desktop.
wp cli - update all the things
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
# Update WordPress and enable auto updates | |
# Install and activate the Akismet plugin | |
wp plugin install akismet --activate | |
# Deactivate the 'disable-wordpress-updates' plugin | |
wp plugin deactivate disable-wordpress-updates | |
# Update all plugins | |
wp plugin update --all | |
# Update the WordPress core | |
wp core update | |
# Enable automatic updates for WordPress core | |
wp config set WP_AUTO_UPDATE_CORE true --raw | |
# Update all plugins again (useful if a core update affects plugin updates) | |
wp plugin update --all | |
# Enable auto-updates for all plugins | |
wp plugin auto-updates enable --all | |
# Update WooCommerce database, if WooCommerce is installed | |
wp wc update | |
# Update the WordPress database (useful after a core update) | |
wp core update-db | |
# Delete all inactive themes | |
wp theme list --status=inactive --field=name | xargs -I % wp theme delete % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment