Feature #14736

Tool for querying active plugins and themes across the network

Added by Boone Gorges 5 months ago. Updated 2 months ago.

Priority name:
Category name:
Internal Tools and Workflow
Target version:
Start date:
Due date:
% Done:


Estimated time:


For years I've struggled with the task of figuring out which sites on the network are using a given theme/plugin. I have found a few existing tools, and I've written a few quick-and-dirty scripts of my own, but they are all extremely slow and somewhat unreliable. The crux of the issue is that WP stores theme and plugin info in individual site `options` tables, and you can't really do queries across these tables.

I've begun work on a tool that syncs theme and plugin data to its own set of network tables, which can then easily be queried to generate reports, etc.

Currently it supports only themes, and has no feature other than the 'sync' tools. Briefly:

wp cac-network-info database install

installs a database with columns for site_id, template, and stylesheet.

wp cac-network-info sync 5

will copy information from site #5 and into the themes table (it supports both of these formats for easy chaining, and it does an internal URL lookup if you pass the URL rather than the blog_id).

wp cac-network-info sync --all-sites

syncs all sites to the table (takes about half an hour on the production site).

There are also mechanisms to ensure that the data is synced whenever a site is created, or on switch_theme

At some point soon, I'll add parallel support for plugins. This minimum amount of work will let us query a single set of MySQL tables to find out what's active across the network. Down the road, I'll add additional CLI tools that allow you to generate reports, perhaps including export to CSV files.


#1 Updated by Raymond Hoh 5 months ago

Big +1 here!

#2 Updated by Matt Gold 5 months ago

this sounds very cool!!!!

#3 Updated by Boone Gorges 5 months ago

I wrote the "plugin" half of the tool this morning and the sync is currently running for the production site. I'll leave this ticket open in case I have the resources to write any reporting tools before the 1.19.0 release.

#4 Updated by Boone Gorges 2 months ago

  • Status changed from New to Resolved

Let's mark this resolved for now, and add new reporting functionality etc as needed.

Also available in: Atom PDF