1

I would like to generate a simple text report for a Wordpress instance listing:

  • Wordpress version
  • plugins installed (version and whether enabled)
  • themes and child themes installed (version and whether enabled)

I can get this information from the Dashboard, but is there a way to get it programmatically (with WP CLI, WP API or regular command line calls)?

2 Answers 2

2

Using WP CLI, you can record Wordpress version using:

wp core version --extra --path="$SITEPATH" > wp-report.txt

and append a list of plugins (with status and version):

wp plugin list --path="$SITEPATH" >> wp-report.txt

and append a list of themes (with status and version) using:

wp theme list --path="$SITEPATH" >> wp-report.txt

Further reading:

1

WP CLI is probably the best for this:

WordPress Version:

wp core version --path="$SITEPATH" > wp-report.txt

List Plugins:

wp plugin list --path="$SITEPATH" >> wp-report.txt

List Themes:

wp theme list --path="$SITEPATH" >> wp-report.txt

(replacing $SITEPATH with the WordPress installation directory.)

Reference: https://developer.wordpress.org/cli/commands/

1
  • thanks for the additional detail, I've updated my answer with these parameters
    – lofidevops
    Commented Jan 4, 2018 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.