Skip to content
Gaurav Tiwari edited this page Aug 27, 2026 · 1 revision

WP-CLI

All commands live under wp gt-performance.

wp gt-performance <command>
Command Purpose
doctor Environment and integration health
cache Page cache operations
queue Run queued jobs
cloudflare Manage the edge rule and purge
xcloud Host cache integration
database Preview or execute cleanup
safety Commerce cache Safety Lab
fleet Create or apply a signed policy bundle

doctor

wp gt-performance doctor

Reports PHP, WordPress, cache directory writability, page drop-in ownership, WP_CACHE, Redis drop-in, Cloudflare, xCloud and WP-Cron health. Start here when something is wrong.

cache

wp gt-performance cache [<action>] [--page-url=<url>]
Action Effect
status (default) Whether caching is enabled and who owns the drop-in
purge Clear the origin cache
warm Queue URLs for preloading, sitemap-driven
install-dropin Install or refresh advanced-cache.php and manage WP_CACHE
explain Full cache decision report for a URL
verify Fetch a URL and confirm the cache behaved as configured
wp gt-performance cache explain --page-url=https://example.com/pricing/
wp gt-performance cache purge --page-url=https://example.com/pricing/
wp gt-performance cache warm

explain is the single most useful command when a page will not cache. See Diagnostics.

queue

wp gt-performance queue run

Processes pending jobs — preloads, revalidations, CSS regeneration. Normally driven by cron; run it manually after cache warm if cron is unreliable, or on a real system cron.

cloudflare

wp gt-performance cloudflare sync
wp gt-performance cloudflare purge --page-url=<url>
wp gt-performance cloudflare diagnose

diagnose tests each stage separately and names the one that failed.

safety

wp gt-performance safety

Runs the non-destructive commerce checks. Places no orders and mutates nothing.

database

wp gt-performance database

Previews what cleanup would remove. See Database Cleanup for the task list and how to execute rather than preview.

fleet

wp gt-performance fleet export
wp gt-performance fleet import

Moves a signed, credential-free settings bundle between your own sites. See Fleet Console.

Running WP-CLI where PHP is unusual

Some hosts ship a CLI PHP without mysqli, so a bare wp fails while the site itself is fine. Run WP-CLI on the same binary the site uses:

php8.5 $(which wp) gt-performance doctor
# or
/usr/local/lsws/lsphp83/bin/php $(which wp) gt-performance doctor

Related

Diagnostics · Troubleshooting

Clone this wiki locally