# Tune WordPress cache settings with Claude Cowork

> Tuning cache settings with Claude Cowork means giving the desktop agent a task, such as fixing a broken script on a WordPress site, and letting it read, propose and write xSpeed settings through xSpeed Hub.

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

You are working in Claude Cowork with a task in front of you rather than a single question. A checkout button stopped responding after you turned on script delay, and you want it sorted before the next campaign email. You describe the symptom and the site. Cowork reaches xSpeed through the connector on your Claude account, lists your sites, reads the module list to find the minify module, and calls get_settings for it to see which script options are on and which scripts are excluded from deferring.

What comes back is a diagnosis you can check and one proposed change, for example turning off Delay JavaScript on that site while leaving minifying on, or adding the checkout script to the list of scripts to never defer or delay. Cowork shows the current values and the new ones, and the Hub tells it to briefly confirm intent before it calls update_settings. If you agree, it writes the single setting and returns the stored values so you can compare. If any key or value is wrong, the whole call is refused and nothing is stored, and credential fields are refused over the Hub.

What differs in Cowork is that it is built to carry a task through several steps, so it may chain the read, the write and a follow-up purge in one run. That makes its approval mode matter more than in a chat. Manual pauses and asks you to Allow or Deny each action, Auto keeps working and blocks what Claude judges unsafe, and Skip asks nothing and checks nothing. Each connector tool also has its own setting under Customize, then Connectors: Always allow, Needs approval or Blocked. Look at both before you ask for a settings change, because the Hub runs the write as soon as your connection allows it.

## 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

- The checkout button on shop stopped working after I enabled script delay. Use xSpeed Hub to look at the minify settings and fix it with the smallest change.
- With xSpeed Hub, compare the lazy loading settings on blog and shop and tell me which one is stricter, without changing anything.
- Use xSpeed Hub to turn page caching off on staging while I debug, then remind me to turn it back on.

## Example session

```
You: Checkout on shop broke after I turned on script delay. Use xSpeed Hub to fix it with the smallest change.
  → get_settings(site: shop, module: minify) [read-only]: minify_js on, defer_js on, delay_js on
Agent: Delay JavaScript is the likeliest cause, because it holds scripts back until a visitor interacts. I would turn only that off and keep minify and defer. Apply it to shop?
You: Go ahead.
  → update_settings(site: shop, module: minify, values: { delay_js: false }) [changes site]: stored, delay_js off, minify_js and defer_js unchanged
Agent: Done. Test the checkout button logged out. If it works, the delay was the cause and we can bring it back with the checkout script excluded.
```

## How it works

1. **List the modules**: list_modules returns every Free and Pro module available on one site, with its settings schema and status. It tells the agent which module slugs exist, such as minify or gzip, and what each setting accepts.
2. **Read the current settings**: get_settings takes a module slug and returns its settings. Credential fields come back masked, so an agent cannot read a stored API token or password back in plain text.
3. **Change them**: update_settings takes the module and a values object of setting keys. The site checks the whole object first. If any key is unknown, any value is outside the schema, or a field is pinned by a constant in wp-config.php, it refuses the write, writes nothing and says which keys and why, sometimes with a "did you mean" hint.
4. **Turn page caching on or off**: Page caching has its own tool, toggle_cache, because it installs or removes the cache drop-in and the WP_CACHE constant. Asking update_settings to set cache_enabled does not work and is refused. If another caching plugin owns the drop-in, the site declines to enable xSpeed and returns blocked: true with the reason.
5. **Check the effect**: The result of a settings write is the stored settings. A module can add a warning when a setting is saved but has no effect on this server, for example Brotli on a server without the module for it, and the agent should pass that on. run_benchmark then times cached against uncached to see whether the change helped.
6. **Apply to many sites only after reading one**: update_settings and toggle_cache accept site: "all" or a list of handles. Each site validates against its own schema and answers in its own row, so a module missing on one site fails that row and the others still apply. Read one site first, then apply.

## Reference

| | |
| --- | --- |
| Discover | list_modules (read): Free and Pro modules, settings schema, status, per site |
| Read settings | get_settings (read): argument module; credential fields masked |
| Change settings | update_settings (write): arguments module and values; validated by the site |
| Bad input | The whole write is refused and nothing is written; the error names the keys and reasons |
| Page cache on or off | toggle_cache (write): argument enabled; cache_enabled in update_settings is refused |
| Blocked by another plugin | toggle_cache returns blocked: true with blocked_reason when another plugin owns the cache drop-in |
| Every site at once | update_settings and toggle_cache accept site: "all" or a list of handles, one result per site |
| Pro modules | A Pro module on a site without an active licence cannot be read or written; the site refuses |
| Credential fields | Refused by default over MCP; set them in the xSpeed dashboard, not through the agent |
| Read-only connection | The connection token with Read-only everywhere on, or a Viewer member's sign-in: update_settings and toggle_cache are refused; list_modules and get_settings still work. An OAuth sign-in gets the scopes the client asks for, read and write by default, clamped to the member's role |
| Confirmation | None on the Hub; the Hub tells the agent to briefly confirm intent for these two, and your client's prompt is the gate |

## Rules

- Read before you write. Ask for list_modules and get_settings first, so the agent changes real keys with valid values instead of guessing.
- update_settings and toggle_cache change how a live site behaves. They run as soon as your connection allows writes. The Hub tells the agent to briefly confirm intent first, which is guidance to the agent, so your client's approval prompt and a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) are the gates. The switch does not limit an OAuth sign-in.
- For site: "all", the Hub tells the agent to confirm once with "this will touch all N sites", then make one call. The result is per site, and some sites failing is a partial result to report, not a blanket success or failure.
- Do not ask an agent to set credentials such as a Cloudflare token or Redis password. The site refuses those writes by default, and they belong in the xSpeed dashboard.
- If a settings result says a value is saved but inactive on this server, relay that. Do not tell the user the feature is enabled.

## Good to know with Claude Cowork

Cowork uses the connectors on your Claude account, so add xSpeed there first and open a new Cowork session afterward, because Cowork syncs connectors at session start. Under Skip, or for a tool set to Always allow, update_settings runs the moment the agent decides to call it, and the Hub's request to confirm is the only brake. Auto relies on Claude's own judgement, which is not a lock, so use Manual with update_settings and toggle_cache on Needs approval for anything you want to see first.

## More prompts for this job

They work in any client connected to xSpeed Hub.

- Use xSpeed Hub to list the modules on shop and tell me which ones are off.
- Ask xSpeed Hub for the current minify settings on blog.
- With xSpeed Hub, turn on HTML minification on blog, then benchmark the cache and tell me if it helped.
- Use xSpeed Hub to turn page caching off on staging while I debug, and tell me when it is off.
- Using xSpeed Hub, read the gzip settings on shop first, then enable the same options on every site.
- Use xSpeed Hub to set the page cache lifespan on docs to 30 days, and if the site refuses it, tell me why.

## Frequently asked questions

### Does Claude Cowork need its own xSpeed connection?

No. Cowork uses the connectors you have added to your Claude account, so the xSpeed Hub connector you added there is the one it calls. If the tools are missing, add the connector in Claude first and then open a new Cowork session, because Cowork loads connectors when a session starts.

### Can Cowork tune settings and test the result for me?

It can change a setting and then read the settings back, purge the site and run a speed test through the Hub. It cannot see your checkout the way a visitor does, so test that page yourself, logged out, after the change.

### How does an agent know which settings exist?

It calls list_modules for the site, which returns every available module with its settings schema and status, then get_settings for the one module it wants to change. The schema says which keys exist and what values each accepts.

### What happens if the agent sends a wrong setting key?

The site refuses the whole update and writes nothing. The error names the keys it rejected and why, such as an unknown key, a value outside the allowed range, or a field fixed by a constant in wp-config.php, and it can suggest the nearest valid key.

### How do I turn page caching on or off with an agent?

Use toggle_cache with enabled set to true or false. It installs or removes the cache drop-in and the WP_CACHE constant. Setting cache_enabled through update_settings does not work. If another caching plugin already owns the drop-in, the site will not enable xSpeed and says why.

### Can one prompt change settings on all of my sites?

Yes. update_settings and toggle_cache accept site: "all", and the Hub runs the sites one after another with a one-second pause and returns a result per site. Each site checks the values against its own schema, so a site that lacks the module fails its own row while the others apply.

### Can the agent change my Cloudflare or Redis credentials?

Not by default. Writing credential fields over MCP is off unless the site owner allows it, and the site refuses the write and names the fields. Set credentials in the xSpeed dashboard. Credential values also come back masked when an agent reads settings.

## Tune cache settings with other agents

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

## More with Claude Cowork

- [Purge the WordPress cache with Claude Cowork](https://xspeedcache.com/agent/claude-cowork/purge-cache/)
- [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/)
- [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 minify CSS and JavaScript: https://xspeedcache.com/docs/minify/
- How to add cache rules and bypasses: https://xspeedcache.com/docs/rules-and-bypass/
- Site MCP tool reference: https://xspeedcache.com/docs/mcp-tool-reference/
