The CachePilot beta is open. Join the beta for free

WP-CLI

CachePilot registers the command wp cachepilot with six subcommands: status, test, flush, stats, dropin and modules. This page lists each of them with its options and messages.

wp cachepilot status

Shows the plugin version, whether a drop-in is installed and whether it is the one of CachePilot, then connects to Redis and prints latency, Redis version, memory used and cached keys.

wp cachepilot status

If Redis is not reachable, the command ends with Error: Redis Connection: failed: and the reason.

wp cachepilot test

Writes a test value through the object cache and directly to Redis, reads it back and deletes it. It prints the ping time and one line for each check.

wp cachepilot test

On success the last line is Success: Redis and the object cache work. If a value comes back different, it ends with Error: The cache did not return what was written.

wp cachepilot flush

Empties the object cache, or one cache group with --group.

wp cachepilot flush
wp cachepilot flush --group=options

When CachePilot shares a Redis database with other applications, a flush only removes keys under its own prefix.

wp cachepilot stats

Shows Redis hits, misses, hit rate, memory used, memory peak and total keys. The option --format takes table, json or yaml; the default is table.

wp cachepilot stats
wp cachepilot stats --format=json

wp cachepilot dropin

Installs or removes the object cache drop-in object-cache.php.

wp cachepilot dropin install
wp cachepilot dropin remove

Caution: dropin remove refuses to delete a drop-in of another plugin and reports Installed drop-in is not from CachePilot. Without the drop-in, WordPress no longer uses Redis.

wp cachepilot modules

Lists the modules with ID, name, version and status, or switches one module on or off. list takes --format with table, json or yaml.

wp cachepilot modules list
wp cachepilot modules activate adminbar
wp cachepilot modules deactivate debug

A switch through WP-CLI counts as your own choice: Autopilot leaves the module as you set it. The IDs are listed on the page Autopilot and Expert mode.

Rolling out on many sites

Together with the plugin commands of WP-CLI, a rollout takes three lines per site. Download the ZIP from your account first.

wp plugin install ./cachepilot-1.4.2.zip --activate
wp cachepilot test
wp cachepilot modules list