Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
~
@abiral

This comment has been minimized.

Copy link

abiral commented Dec 16, 2015

I am a new one to this ssh thing and WP CLI too.

can you provide an example too?

Thanks in advanced :)

@tomjn

This comment has been minimized.

Copy link

tomjn commented Dec 16, 2015

. loop-multisite.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.