Skip to content

Instantly share code, notes, and snippets.

@carlthewebmaster
Created May 7, 2015 13:32
Show Gist options
  • Save carlthewebmaster/693c2e0085d189096cb9 to your computer and use it in GitHub Desktop.
Save carlthewebmaster/693c2e0085d189096cb9 to your computer and use it in GitHub Desktop.
Wp Updater
# Carl's wp updater
# assumes wp-cli is aliased to wp
wp core check-update
read -r -p "Update Core? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
wp core update
fi
wp plugin list
read -r -p "Update Plugins? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
wp plugin update --all
fi
wp theme list
read -r -p "Update Themes? [y/N] " response
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]
then
wp theme update --all
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment