Purge site caches
purge_cacheClear all cached pages or a single URL across WordPress cache layers and host/CDN caches when front-end changes do not appear. Re-fetches the page afterward and reports cache headers to reveal whether a CDN still serves the old copy.
Instructions
Clear the site's caches through each installed cache layer's own API — WP Rocket, LiteSpeed, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround, Cache Enabler, Breeze, Hummingbird, Nginx Helper, Autoptimize, Varnish (Proxy Cache Purge), WP-Optimize, the Cloudflare plugin, and Kinsta / WP Engine / Pantheon / GoDaddy host caches — plus the object cache. Use it when a change does not appear on the front end. With scope "url" only that page is purged where the layer supports it. Afterwards the page is re-fetched as a visitor and its cache headers reported, so you can tell whether a CDN WordPress cannot reach still holds the old copy. Needs the companion plugin.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "purge_cache"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Path or full URL on this site to purge, e.g. "/pricing/". Required when scope is "url"; for "all" it only chooses which page to re-fetch for verification (default: homepage). | |
| scope | No | "all" purges every cache; "url" purges one page (layers without per-URL purging are cleared entirely). | all |
| verify | No | Re-fetch the page anonymously after purging and report its cache headers. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. |