Recently I found myself needing to force download all plugins and themes in a WordPress installation. Now, the old way would be to download them, upload them via SFTP. Very laborious, no fun.
Enter the fun way: WP-CLI. If you’re unfamiliar with WP-CLI, it’s the command line tool for WordPress. And as all sites on Servebolt have the wp
command available, this was super easy to do with just two commands:
Force download all plugins:
wp plugin install $(wp plugin list --field=name) --force
Force download all themes:
wp theme install $(wp theme list --field=name) --force
Leave a Reply