List of active plugins on a Multisite installation.
When I start a new client project I create a new sub-site on my development site. This site is a password protected WordPress Multisite installation. Finding sub-sites that use a specific plugin is difficult so I found and fixed an overview list.
My development site currently has 65 sub-sites, 221 plugins and 96 themes. Sometimes I create a new sub-site so that I can experiment with a plugin. These sub-sites are named similar to the plugin. Other times I experiment with a plugin in a sub-site that wasn’t created just for that plugin. Finding these sub-sites is not possible without going into the Dashboard of each one. I needed a better way.
Hello StackExchange
I am always impressed with the high quality of answers on WordPress StackExchange. The upvoting of answers helps visitors find the best answer.
Back in June 2012 someone asked how to get a list of active plugins for each sub-site (including network active ones). The most helpful reply provided code to display a Dashboard widget with a list of active plugins.
I copied it to a text file, added the plugin header comments and activated it. My development site has WP_DEBUG enabled (set to ‘true’) so any warnings or notices are written to wp-content/debug.log. The code generated a warning about $wpdb->prepare() so I removed it (I think it was because there was no substitution in the query string – maybe I should change the string to use substitutions for the two $wpdb parameters).
Updated Code and Screenshot
The code works for me and I find it very useful and a significant time saver.

Leave a Reply