This command-line tool was created to help developers who maintain a large number of Pantheon-hosted WordPress 8+ sites to easily identify which sites have an active instance of a particular plugin or plugins. The primary use case is for enabling a quick response to critical security advisories.
Requires command-line access to a properly configured instance of Pantheon's Terminus CLI tool.
Use this script using the following syntax:
plugin-hunt plugin_name [plugin_name2]
If you need to search for additional plugins, just keep appending their names as arguments. There is not limit.
Plugin Hunter checks for the plugin on the live environment, except when a site is on a Sandbox plan. In that is the case, Plugin Hunter instead checks the dev environment.
This script has thus far proven stable for our use cases, but has not been extensively tested.
If you use composer global
to install and maintain php tools and libraries, you may add Plugin Hunter to your command line via:
composer global require devcollaborative/plugin-hunter
NOTE: As this library is currently pre-release, your global composer.json must include a minimum-stability value of either "alpha" or "dev".
Download/clone this library and run the command from its directory as ./plugin-hunt
- Make this a terminus plug-in instead[?]