Skip to content

Instantly share code, notes, and snippets.

@abiral
Forked from rorymcdaniel/loop-multisite.sh
Created December 16, 2015 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abiral/6d348393a33850d953d1 to your computer and use it in GitHub Desktop.
Save abiral/6d348393a33850d953d1 to your computer and use it in GitHub Desktop.
Bash script that will regenerate all images for all sites in a WordPress multisite network
#!/bin/bash
for site in `wp site list --field=url`; do
wp media regenerate --yes --url=$site
done
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment