WP-CLI: Work faster, not harder.
Presented at WordCamp Nashville, 2016
A bit about myself
• Operations Engineer at WP Engine
• At WP Engine for 4 years, working with WordPress for 7+
• Uses WP-CLI to manage over 300k WordPress installations
Customer Experience Operations @ WP Engine
What is WP-CLI & how do I get it?
WP-CLI on a single installation
WP-CLI via orchestration tools
Out of the box
35 Core Commands
Everything from installing a plugin, to clearing WordPress’ transient cache
•Perform database operations
•Import or export site data
•Search & replace
You can download the WP-CLI archive
manually, from WP-CLI.org
● Download the archive
● Save it in a safe place (/usr/local/bin
● Make it executable
WP-CLI is easily accessible for users of
the homebrew package manager
$ brew install homebrew/php/wp-cli
You can include WP-CLI in your php-
based project, using Composer!
● Just require it in your composer.json
In my opinion, WP CLI’s true power is in it’s
ability to scale past just one WordPress
How large organizations use WP-CLI to scale
Using Ansible + WP-CLI, WP Engine was able to roll out
updates in response to a plugin security vulnerability to
10s of thousands of sites.
Core, Plugin, and Theme Updates
WP Engine updated 10s of thousands of sites using
outdated Jetpack, in response to a security
WP-CLI’s useful import/export, and search & replace tooling
enables developers to develop locally.
Additionally, WP-CLI has the ability to perform commands on
a remote target.
Continuous development and maintenance
WP-CLI helps developers develop locally, and maintain
their live sites
Plugin, Theme, and Core Updates
WP Engine used Ansible along with
WP-CLI to run critical security
updates for over 10,000 WordPress
WP-CLI excels when paired with
WP-CLI has built-in commands to install, update, and delete plugins
These commands can be passed via orchestration software to as
many WordPress instances as you have! This enables site
administrators and developers to easily manage a fleet of sites.
Scale using your orchestration tool of choice
Many different orchestration tools can be used to
scale your use of WP-CLI to many different
Continuous Development & Maintenance
The built-in set of commands help
developers to create, update, import,
and export WordPress installs. This
can even be scripted, so developers
can repeat the process often.