You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m interested in getting a list of WP core versions exported as json, csv, etc. that I can put together as a list quickly/repeatedly as needed. A step further would be doing the same for plugins (list plugin and its version).
I’m thinking this isn’t possible natively with just WP CLI or GP API but maybe doable combining both?
Using WP CLI I can get the info I’m after:
wp core version
wp plugin list --status=active --format=json
but that requires needing to be logged in as the site user or at least providing the site path using sudo -u USER -i – wp plugin list --status=active --format=json --path=sites/SITEURL/htdocs
I could do a dump of all of the users and their associated sites to a csv and then have a script run through those with the commands to get the output but that seems like a lot of manual work. I imagine doing the same leveraging GP API would be possible to do this using get sites and then running the WP CLI to get the WP version & plugins for each result.
Before I go down this method, is there an easier way to accomplish this I’m not seeing?
If there’s a question of ‘why’ would I want this…
Half of my sites are on a care plan, those are integrated into some management such as MainWP where I can easily get and monitor all of this.
The other half are not and are paying for hosting only. This information would let me proactively get their WP version, plugins, etc. that might be vulnerable and reach out to fix that before it becomes a problem for them.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: