Skip to content

Instantly share code, notes, and snippets.

@bigdawggi
Last active February 16, 2023 05:54
Show Gist options
  • Save bigdawggi/9079774 to your computer and use it in GitHub Desktop.
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)
# 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
@iandunn
Copy link

iandunn commented Jan 13, 2022

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