-
-
Save pareshsojitra/1e0b932498321ee559ecb304bb7cd3d1 to your computer and use it in GitHub Desktop.
Update all WordPress plugins using WP-CLI and make a separate git commit for each one
This file contains hidden or 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
#!/bin/bash | |
PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r'); | |
wp plugin update-all; | |
for plugin in $PLUGINS; do | |
git add -A "wp-content/plugins/$plugin"; | |
git commit -m "Update plugin: $plugin"; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment