Call for Testing: WP-CLI (Beta)

Today, we’ve enabled our WP-CLI beta on all VIP environments! For the moment this is limited to a subset of core WP-CLI commands, but in time we plan to add more commands and allow custom commands.

What can I do with WP-CLI?

WP-CLI is a powerful and extensible way to interact with WordPress from the command line. This beta release allows you to run WP-CLI commands on your VIP environments from your local terminal application, using our VIP-CLI.

Most things you can do with WordPress core have an equivalent command in WP-CLI:

For the initial release, we have enabled a variety of core WP-CLI commands and will be adding support for custom commands in the coming weeks (stay tuned!) A complete list of available commands is at the bottom of this post.

How do I get it?

To get started, install the latest version of VIP-CLI. VIP-CLI is our command line tool for interacting with your VIP application and environments.

npm i -g @automattic/vip

How do I run WP-CLI commands?

The easiest way to use WP-CLI is to use the interactive shell. This feature provides a terminal-like interface into your WordPress environment:

vip -- wp

my-site.production> wp option get home
https://example.com

Commands can also be run directly, like any other VIP-CLI command:

vip @my-site.production -- wp option get home
vip @my-site.staging -- wp post list --posts_per_page=100 --url=example.com/fr
vip @my-site.develop -- wp cache delete some-key

Running commands directly allows the output to be redirected and piped for creating powerful workflows and tools:

vip @my-site.develop -- wp user list --format=json | jq
vip @my-site.staging -- wp term list category --format=csv > category.csv

Finally, to give your team greater visibility into how WP-CLI is being used, the VIP Dashboard includes a log of all WP-CLI commands run on your applications and environments. To view the log, log in to the Dashboard and select “WP-CLI” when viewing an application.

The VIP Dashboard includes a log of all WP-CLI commands run.

More information about WP-CLI on VIP can be found in our documentation.

If you have any feedback, questions, or issues with WP-CLI, please get in touch!

Note: In the examples above, the double dash (--) before wpseparates arguments of the vip command from those of the wp command. You should always include them to avoid unexpected issues due to parameter conflicts.


Allowed commands

wp cache add
wp cache decr
wp cache delete
wp cache get
wp cache incr
wp cache replace
wp cache set
wp cache type
wp cap (all)
wp cli version
wp comment approve
wp comment count
wp comment create
wp comment delete
wp comment exists
wp comment get
wp comment list
wp comment meta
wp comment recount
wp comment spam
wp comment status
wp comment trash
wp comment unapprove
wp comment unspam
wp comment untrash
wp comment update
wp core version
wp cron (all)
wp embed (all)
wp help (all)
wp language core activate
wp language core is-installed
wp language core list
wp language plugin is-installed
wp language plugin list
wp language theme is-installed
wp language theme list
wp media image-size
wp menu (all)
wp network (all)
wp option (all)
wp plugin activate
wp plugin deactivate
wp plugin get
wp plugin is-active
wp plugin is-installed
wp plugin list
wp plugin path
wp plugin search
wp plugin status
wp plugin toggle
wp plugin verify-checksums
wp post create
wp post delete
wp post exists
wp post get
wp post list
wp post meta
wp post term
wp post update
wp post-type (all)
wp rewrite (all)
wp role (all)
wp sidebar (all)
wp site activate
wp site archive
wp site create
wp site deactivate
wp site delete
wp site list
wp site mature
wp site meta
wp site option
wp site private
wp site public
wp site spam
wp site switch-language
wp site unarchive
wp site unmature
wp site unspam
wp super-admin (all)
wp taxonomy (all)
wp term create
wp term delete
wp term get
wp term list
wp term meta
wp term recount
wp term update
wp theme activate
wp theme disable
wp theme enable
wp theme get
wp theme is-active
wp theme is-installed
wp theme list
wp theme mod
wp theme path
wp theme search
wp theme status
wp transient (all)
wp user add-cap
wp user add-role
wp user check-password
wp user create
wp user delete
wp user get
wp user list
wp user list-caps
wp user meta
wp user remove-cap
wp user remove-role
wp user reset-password
wp user session
wp user set-role
wp user spam
wp user term
wp user unspam
wp user update
wp widget (all)
wp akismet check
wp akismet recheck_queue
wp akismet stats
wp jetpack get_stats
wp jetpack module
wp jetpack options
wp jetpack publicize
wp jetpack sitemap
wp jetpack status
wp jetpack test-connection

2 thoughts on “Call for Testing: WP-CLI (Beta)

    • Hi Erick 👋 At that point the custom (non-core) Cron Control commands would be supported, but we do not currently have plans to substitute the Cron Control commands for core Cron commands. Happy to discuss this further, please feel free to ping me.

Comments are closed.