Skip to content

Instantly share code, notes, and snippets.

@jasondewitt
Last active June 2, 2016 21:00
Show Gist options
  • Save jasondewitt/08c234697e3428738dbf69ae9c46bb31 to your computer and use it in GitHub Desktop.
Save jasondewitt/08c234697e3428738dbf69ae9c46bb31 to your computer and use it in GitHub Desktop.
search and replace all http://domain.com occurrences with https://domain.com in a WP multisite install for all sites
for x in $(wp site list --fields=domain --format=csv);
do
if [ $x != 'domain' ];
then
wp search-replace http://$x https://$x --network --url=$x
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment