Skip to content

Instantly share code, notes, and snippets.

@tangrufus
Last active August 16, 2022 13:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tangrufus/5e26e14bc95fe343e5bc9dea1018e241 to your computer and use it in GitHub Desktop.
Save tangrufus/5e26e14bc95fe343e5bc9dea1018e241 to your computer and use it in GitHub Desktop.
List active themes for each sites in a network on WP VIP
#!/bin/bash
set -euo pipefail
echo 'Fetching URLs...'
urls=$(vip -y @theApp.theEnv -- wp site list --fields="url" --format="csv")
for url in $urls
do
if [ "${url}" == "url" ]; then
continue # skip the CSV header
fi
echo "Checking ${url}"
vip -y @theApp.theEnv -- wp theme list --status=active --format=csv --fields=name,status,version,enabled --url="${url}"
done
echo 'Done!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment