Skip to content

Instantly share code, notes, and snippets.

@tylerdigital
Created May 28, 2015 19:25
Show Gist options
  • Save tylerdigital/e5616db2def62fc94af1 to your computer and use it in GitHub Desktop.
Save tylerdigital/e5616db2def62fc94af1 to your computer and use it in GitHub Desktop.
Update WordPress plugins and commit to git with WP-CLI
for plugin in `/usr/local/bin/wp plugin list --update=available --field=name`; do
/usr/local/bin/wp plugin update $plugin
git add .
git add -u .
git commit -m "Updating plugin $plugin"
done
@tylerdigital
Copy link
Author

git add -A should work, but for some reason on our distribution/version of linux + git running on Digital Ocean, we had to use the older -u syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment