# Purge the WordPress cache with Claude Cowork

> Purging the WordPress cache with Claude Cowork means giving the desktop agent a task that includes clearing the xSpeed cache on the right site, using the xSpeed Hub connector already on your Claude account.

Page: https://xspeedcache.com/agent/claude-cowork/purge-cache/
Last updated: October 2026

Cowork is built for work with several steps, so a purge usually arrives inside a bigger request. You are wrapping up a site update on your desktop and write something like: check that the new landing page is live, purge the cache on the site, and tell me when the pages are warm. Cowork treats the purge as one item on that list rather than a conversation of its own, and it reports on all of it at the end.

Cowork does not take its own server list. It uses the connectors on your Claude account, so xSpeed Hub has to be added in Claude first, and then it is available to Cowork. From there the sequence is the one every agent follows: list_sites to match the name, purge_cache with a type that fits, and start_preloader if you asked for a warm-up. The tool results come back into the task, and Cowork folds them into its summary of what it did.

Cowork has three modes, Manual, Auto and Skip, and each Hub tool also carries a connector permission of Always allow, Needs approval or Blocked. In Manual mode Always allow runs, Needs approval asks you to Allow or Deny, and Blocked is denied. The Hub adds no confirmation, so those settings and your connection scope are what stand between the request and the purge. Because a task can run several steps in a row, use Manual mode when you want to see each one. For a purge of every site, the Hub also tells Cowork to say that it will touch all the sites and wait for your yes.

## Set up Claude Cowork once

### 1. Put your sites in xSpeed Hub

Sign in at app.xspeedcache.com with Google or email; the Hub is free and has no site cap. Then connect each WordPress site from its own dashboard: click Connect Hub in the xSpeed Cache top bar, then Connect via xSpeed Hub. Each site needs the free xSpeed Cache plugin.

### 2. Add xSpeed Hub to your Claude account

Cowork does not keep its own connector list. In Claude, go to Customize > Connectors, click Add custom connector, name it xspeedhub, paste the URL, choose Sign in now and, if asked, Register automatically. The full steps, including the Team and Enterprise route, are on the Claude page: /agent/claude/.

```
https://app.xspeedcache.com/xspeed/mcp
```

### 3. Connect, then start a new Cowork session

Click Connect on the connector and approve access on the xSpeed Hub page. Cowork loads the connectors enabled for your account when a session starts, so open a new Cowork session after you connect. You can also switch the connector on from the + menu in the chat box.

```
Customize  >  Connectors  >  xspeedhub  >  Connect
```

### 4. Set tool permissions before the first task

Open the connector under Customize > Connectors and set each tool to Always allow, Needs approval or Blocked. A sensible start is Always allow for the read tools and Needs approval for purge_cache, toggle_cache, update_settings and the other writes. Then pick a Cowork mode; Manual is the one that shows you each request.

```
Tool permissions: get_cache_status = Always allow
Tool permissions: purge_cache = Needs approval
```

Full setup: https://xspeedcache.com/agent/claude-cowork/

### Before you send a prompt that changes something

Reads change nothing on your sites, though contact_support emails xSpeed support. Writes run once your connection allows them, so your client's approval prompt and a read-only connection (the token's Read-only everywhere switch, or a Viewer sign-in) are the gates that matter. Cowork has three modes. Manually approve (Manual) pauses and asks you to Allow or Deny each action. Automatically approve (Auto) keeps working and blocks what Claude judges to be unsafe. Skip all approvals (Skip) asks nothing and checks nothing. Each connector tool also has a permission, set under Customize > Connectors. In Manual mode, Always allow runs, Needs approval asks and Blocked is denied; in Skip mode only Blocked stops a call. xSpeed Hub has no confirmation step of its own, so under Skip, or for any tool set to Always allow, a write runs as soon as your connection allows writes. Auto relies on Claude's own judgement, which is not a lock.

## Prompts

- After I update the sale pages on shop, use xSpeed Hub to clear the page cache and warm it, then summarize what changed in one paragraph.
- Work through my post-deploy checklist for blog with xSpeed Hub: purge assets, start the preloader, and report the hit ratio.
- As the last step of this task, use xSpeed Hub to purge every site in my workspace, and list any that failed.

## Example session

```
You: Wrap up the spring sale update on shop: confirm the sale page is live, then use xSpeed Hub to clear whatever cache is stale.
  → list_sites [read-only]: 6 sites; shop is shop.example.com
  → get_cache_status(site: shop) [read-only]: page cache on, 308 cached pages, hit ratio 62% in the last 24h
Agent: The sale page is a content change, so I will purge the page cache on shop, leave assets alone, and start the preloader after. Go ahead?
You: Yes.
  → purge_cache(site: shop, type: page) [changes site]: 308 cached pages cleared
  → start_preloader(site: shop) [changes site]: preloader started, 308 URLs queued
Agent: Both steps are done: the page cache is cleared and 308 URLs are warming. I have not checked the sale page itself, since none of these tools reads page content, so open it logged out to confirm it is live. I can read the hit ratio again once the queue finishes.
```

## How it works

1. **Find the site**: The agent calls list_sites when you have more than one site, then matches the name you used to a site handle. If the name could mean two sites, the Hub tells it to ask you rather than guess.
2. **Pick the purge type**: purge_cache takes a type: all, page, assets, object or rest. all clears the page cache, the object cache and, when they are connected, the Cloudflare edge and CDN. After a theme or CSS change, assets is enough; after a content edit, page; after a deploy, all.
3. **Purge**: The call runs straight away on that site once your connection allows writes. For every site at once the agent passes site: "all", and the Hub runs the sites one after another with a one-second pause.
4. **Clear only the edge if that is all you need**: purge_cloudflare empties the Cloudflare edge cache on its own, without touching the copies on your server. A page or assets purge does not reach Cloudflare; a purge of type all does when Cloudflare is connected.
5. **Warm it again**: start_preloader rebuilds the cache in the background so the first visitors after the purge are not the ones paying for it.

## Reference

| | |
| --- | --- |
| Tool | purge_cache (write) |
| Purge types | all, page, assets, object, rest |
| What all covers | Page cache, object cache, plus the Cloudflare edge and CDN when connected |
| Every site at once | site: "all" or a list of handles, one result per site |
| Fan-out pacing | Sites run one after another with a 1 second pause |
| Edge only | purge_cloudflare, a separate write tool |
| Re-warm | start_preloader after the purge |
| Read-only access | purge_cache is refused on a connection token with Read-only everywhere on, and for a Viewer sign-in |
| Confirmation | None on the Hub; your client's prompt is the gate |

## Rules

- Name the site. With several sites, an unclear name should make the agent ask, and the Hub tells it to.
- A purge of every site is one call with site: "all". The Hub tells the agent to confirm it with you once before it runs.
- Purge the narrowest type that fixes the problem, then warm the cache, so visitors do not all hit uncached pages at once.
- A fan-out result is reported per site. Treat some sites failing as a partial result, not a failure of the whole call.

## Good to know with Claude Cowork

Cowork reads the connector from your Claude account and syncs it when a session starts, so if it says it has no xSpeed tools, add or check the connector in Claude and open a new Cowork session. When you fold a purge into a long task, name the site and the purge type in the request, because a loose instruction to clear the cache gives the agent room to choose all when assets would have done. Skip mode asks nothing and checks nothing, and Auto leaves the call to Claude's own judgement, which is not a lock. A purge in the middle of a long task is reliably gated only in Manual mode with purge_cache on Needs approval or Blocked.

## More prompts for this job

They work in any client connected to xSpeed Hub.

- Use xSpeed Hub to purge the page cache on blog.
- I just changed the theme CSS on shop. Use xSpeed Hub to purge only the assets cache there.
- With xSpeed Hub, purge every site in my workspace and tell me which ones failed.
- Use xSpeed Hub to purge shop, then purge its Cloudflare edge cache too.
- With xSpeed Hub, purge the docs site and start the preloader so it is warm again.
- Using xSpeed Hub, what purge type should I use after updating a plugin that changes the checkout page?

## Frequently asked questions

### Do I connect xSpeed to Claude Cowork separately?

No separate setup. Cowork uses the connectors on your Claude account, so you add xSpeed Hub in Claude and it is available to Cowork from there. If Cowork does not see it, check the connector list in Claude first.

### Can Claude Cowork purge the cache without my approval?

That depends on the mode and the tool setting. In Manual mode Cowork asks you to Allow or Deny unless purge_cache is set to Always allow, and in Skip mode it asks nothing. xSpeed Hub has no confirmation step of its own, so an allowed purge runs as soon as the connection allows writes. A sign-in as a Viewer member is read-only and refuses every purge.

### What is the difference between the purge types?

all clears every cache xSpeed manages for the site, including a connected Cloudflare zone or CDN. page clears the stored HTML pages, assets clears minified and combined CSS and JavaScript, object clears the Redis or Memcached object cache, and rest clears cached REST API responses.

### Does purging xSpeed also clear Cloudflare?

A purge of type all does, when the site has Cloudflare connected in xSpeed: it clears the page cache, the object cache and the Cloudflare edge, and reports each one. A page, assets or rest purge stays on your server. purge_cloudflare clears only the edge.

### Can I purge all of my sites with one prompt?

Yes. The agent passes site: "all" to purge_cache and the Hub purges every site in the workspace one after another, returning a result per site. The Hub tells the agent to confirm a write across every site with you once before it runs it.

### Will a purge slow my site down?

The next request to each purged page builds it fresh, which is slower than a cached hit. Starting the preloader right after the purge rebuilds the cache in the background so visitors mostly land on warm pages.

## Purge the cache with other agents

[Claude Code](https://xspeedcache.com/agent/claude-code/purge-cache/) · [Claude](https://xspeedcache.com/agent/claude/purge-cache/) · [ChatGPT](https://xspeedcache.com/agent/chatgpt/purge-cache/) · [Codex](https://xspeedcache.com/agent/codex/purge-cache/) · [Cursor](https://xspeedcache.com/agent/cursor/purge-cache/) · [GitHub Copilot in VS Code](https://xspeedcache.com/agent/github-copilot/purge-cache/) · [Windsurf](https://xspeedcache.com/agent/windsurf/purge-cache/) · [Gemini CLI](https://xspeedcache.com/agent/gemini-cli/purge-cache/) · [Antigravity](https://xspeedcache.com/agent/antigravity/purge-cache/) · [Zed](https://xspeedcache.com/agent/zed/purge-cache/) · [Kiro](https://xspeedcache.com/agent/kiro/purge-cache/) · [OpenCode](https://xspeedcache.com/agent/opencode/purge-cache/) · [OpenClaw](https://xspeedcache.com/agent/openclaw/purge-cache/) · [Hermes Agent](https://xspeedcache.com/agent/hermes-agent/purge-cache/) · [Grok Build](https://xspeedcache.com/agent/grok-build/purge-cache/) · [ChatGPT dots](https://xspeedcache.com/agent/chatgpt-dots/purge-cache/) · [Grok](https://xspeedcache.com/agent/grok/purge-cache/) · [Grok Bot](https://xspeedcache.com/agent/grok-bot/purge-cache/) · [Muse](https://xspeedcache.com/agent/muse/purge-cache/) · [Manus](https://xspeedcache.com/agent/manus/purge-cache/) · [Kimi Code](https://xspeedcache.com/agent/kimi/purge-cache/) · [Paperclip](https://xspeedcache.com/agent/paperclip/purge-cache/) · [NanoClaw](https://xspeedcache.com/agent/nanoclaw/purge-cache/)

## More with Claude Cowork

- [Find out why WordPress pages are not cached with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/troubleshoot-cache/)
- [Scan a website for speed problems with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/speed-scan/)
- [Run and track PageSpeed tests with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/pagespeed-tests/)
- [Raise a WordPress site's PageSpeed score with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/optimize-site/)
- [Tune WordPress cache settings with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/cache-settings/)
- [Warm the WordPress cache with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/preload-cache/)
- [Set up the Redis object cache with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/object-cache/)
- [Manage Cloudflare caching with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/cloudflare/)
- [Manage every WordPress site at once with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/fleet/)

## Documentation

- How to enable Page Cache: https://xspeedcache.com/docs/page-cache/
- How to warm your cache ahead of visitors: https://xspeedcache.com/docs/preloader/
- Managing your fleet with xSpeed Hub: https://xspeedcache.com/docs/managing-your-fleet-with-xspeed-hub/
