Last active
August 16, 2022 13:33
-
-
Save tangrufus/5e26e14bc95fe343e5bc9dea1018e241 to your computer and use it in GitHub Desktop.
List active themes for each sites in a network on WP VIP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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