Finding all Sites That have a Plugin Active

I wanted to find out which sites in a Multisite network had a certain plugin active, but couldn’t find an existing solution I was happy with. So, I wrote a WP-CLI command to do the job.

Installation

wp package install iandunn/wp-cli-plugin-active-on-sites

Usage

wp plugin active-on-sites

Example

> wp plugin active-on-sites eu-cookie-law-widget

Checking each site 100% [======================================] 0:02 / 0:03

Sites where eu-cookie-law-widget is active:
+---------+----------------------------------------+
| Site ID | Site URL                               |
+---------+----------------------------------------+
| 320     | 2014.madrid.wordcamp.dev/              |
| 371     | 2014.paris.wordcamp.dev/               |
| 413     | 2015.london.wordcamp.dev/              |
| 464     | 2015.milano.wordcamp.dev/              |
| 522     | 2016.geneva.wordcamp.dev/              |
| 571     | 2016.belfast.wordcamp.dev/             |
| 654     | 2017.europe.wordcamp.dev/              |
+---------+----------------------------------------+

Leave a Reply

Your email address will not be published. Required fields are marked *