Last active
February 16, 2023 05:54
-
-
Save bigdawggi/9079774 to your computer and use it in GitHub Desktop.
WP-CLI commands to get the active themes across a WordPress blog network (single site ID with multiple blogs for the site)
This file contains 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
# Be sure to change or omit the --network parameter; it defaults to 1. | |
wp site list --network=4 --field=url | while read line; do wp theme list --status=active --field=name --url=$line >> /tmp/wpcli-themes.txt; done && sort /tmp/wpcli-themes.txt | uniq -c |
wp find-unused-themes
fixed the performance issue, so it's a good solution now IMO.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think using something like
wp option get stylesheet --url="$line"
should go much faster thanwp theme list