Skip to content

Instantly share code, notes, and snippets.

@rolandinsh
Last active December 31, 2015 04:29
Show Gist options
  • Save rolandinsh/7934284 to your computer and use it in GitHub Desktop.
Save rolandinsh/7934284 to your computer and use it in GitHub Desktop.
WP-CLI bash update
#!/bin/bash
declare -a wp_sites=('/var/www/pub/site1/' '/var/www/pub/site2/')
for site in "${wp_sites[@]}"; do
echo Upgrade in prograss for $site...
wp --path=$site db export $site/db-backup.sql
wp --path=$site core update
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment