xSpeed Cache is officially live! Get 50% OFF during Launch Week — Lifetime starts at just $79Lifetime from $79 — 50% OFF, Launch Week! See Plans →

See Plans →
Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin

Tune WordPress cache settings with Grok

Tuning cache settings with Grok means asking xAI's assistant on grok.com to read the xSpeed modules of your WordPress sites, explain what differs between them, and write one change through the xSpeed Hub connector when you agree.

list_sitesget_cache_statuslist_modulesget_settingsupdate_settingstoggle_cacherun_benchmark

Last updated: October 2026

Example session · Grok

You: Using xSpeed Hub, why does docs feel heavier than blog? Compare their minify settings.

get_settings(site: blog, module: minify) read-only
→ minify_css on, minify_js on, defer_js on

get_settings(site: docs, module: minify) read-only
→ minify_css off, minify_js off, defer_js off

Grok: docs has every minify option off, while blog has them on. I would turn on CSS and JavaScript minify on docs and leave defer off until you test it. Apply that to docs?

You: Yes, those two only.

update_settings(site: docs, module: minify, values: { minify_css: true, minify_js: true }) changes site
→ stored, minify_css on, minify_js on, defer_js unchanged

Grok: Done. Purge the assets cache on docs so visitors get the smaller files, then check a page while logged out.

01

How Grok handles this

You are in a Grok chat on grok.com with xSpeed Hub added as a custom connector, and two of your sites feel different for no clear reason: blog loads lean, while docs feels heavy on every page. You ask Grok to compare them. Because the question is about your sites, Grok reaches for the connector. It calls get_settings for the minify module on both sites, and list_modules if it needs to see what else is switched on, so the comparison rests on stored values rather than on general advice about WordPress speed.

What comes back is the gap, stated plainly: blog minifies its CSS and JavaScript and docs does neither. Grok proposes the smallest change that closes it, turning on CSS and JavaScript minify on docs and leaving defer off until you have tested it, and the Hub tells the agent to briefly confirm intent before update_settings. After your yes it calls update_settings for docs and shows the stored values. The site checks every key and value against the module schema, so a wrong one refuses the whole call and nothing is written, a Pro-only module is refused on a site without a licence, and credential fields are refused over the Hub. A warning that a setting is saved but has no effect on that server should be passed on, not dropped.

What differs in Grok is the approval model. xAI's connector documentation describes no per-tool approval setting, and it says Grok can use a connector's tools whenever your question relates to that service. So the question Grok asks in the chat is the only pause before update_settings or toggle_cache, and it comes from the model's habit and the Hub's instructions, not from a switch you set. Word requests with care: say read only when you only want a comparison, and read what Grok says it is about to change before you answer yes.

02

Set up Grok once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Grok guide.

1Put 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.

2Add xSpeed Hub as a custom connector

Go to grok.com/connectors, click New Connector and select Custom. Enter this as the MCP server URL and complete the authentication: approve access on the xSpeed Hub page that opens. Grok then reads the Hub's tools and makes them available in your conversations.

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

3Ask a first question

Start a chat and ask something that names xSpeed Hub, so Grok reaches for the connector. A list of your sites with their cache status means the connection works.

Text
Use xSpeed Hub to list my sites and tell me which ones have page caching turned off.
1 / 3

Full Grok setup, sign-in options and FAQ

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. xAI's connector documentation describes no per-tool approval setting. It says Grok can use a connector's tools whenever your questions relate to that service. xSpeed Hub has no confirmation step of its own, so a purge or a settings change runs as soon as Grok calls it and your connection allows writes. The Hub tells the agent to confirm the target site and to ask once before a write that touches every site, but that is an instruction, not a lock. If you want Grok to read and never change anything, sign in as a Viewer member of the workspace, which only ever gets read access. Otherwise read what Grok says it is about to do before you answer yes.

03

What do I ask?

Three prompts written for Grok. More for this job are below.

Prompt for Grok
Using xSpeed Hub, compare the minify settings on blog and docs and tell me what differs. Read only.
Prompt for Grok
With xSpeed Hub, turn on CSS and JavaScript minify on docs, and show me the settings before and after.
Prompt for Grok
Ask xSpeed Hub which modules are off on shop and explain what each one would do if I turned it on.
04

What happens, step by step

Every xSpeed feature is a module with its own settings. Through xSpeed Hub an agent can list the modules a site has, read one module's settings, change them with a checked update, and turn page caching on or off. The site validates every write against the module's own schema, so a wrong key or value is refused with a reason instead of being quietly ignored.

01

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.

02

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.

03

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.

04

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.

05

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.

06

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.

05

Reference

Discoverlist_modules (read): Free and Pro modules, settings schema, status, per site
Read settingsget_settings (read): argument module; credential fields masked
Change settingsupdate_settings (write): arguments module and values; validated by the site
Bad inputThe whole write is refused and nothing is written; the error names the keys and reasons
Page cache on or offtoggle_cache (write): argument enabled; cache_enabled in update_settings is refused
Blocked by another plugintoggle_cache returns blocked: true with blocked_reason when another plugin owns the cache drop-in
Every site at onceupdate_settings and toggle_cache accept site: "all" or a list of handles, one result per site
Pro modulesA Pro module on a site without an active licence cannot be read or written; the site refuses
Credential fieldsRefused by default over MCP; set them in the xSpeed dashboard, not through the agent
Read-only connectionThe 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
ConfirmationNone on the Hub; the Hub tells the agent to briefly confirm intent for these two, and your client's prompt is the gate
06

Rules worth keeping

  • 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 Grok

If you want Grok to look and never write, sign in to xSpeed Hub as a Viewer member of the workspace, which only ever gets read access, so the Hub refuses update_settings and toggle_cache whatever Grok decides. The connection token's Read-only everywhere switch does not help here, because xAI describes no header field for a custom connector and the sign-in is OAuth. On Grok Business and Enterprise a team admin has to provision the connector in the cloud console before you can add it.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

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

Frequently asked questions

Yes, by signing in as a Viewer member of the workspace, which only gets read access, so the Hub refuses every write tool. xAI describes no per-tool approval setting for connectors, so a Viewer sign-in is the dependable way to keep Grok to reads.

xAI says Grok can use a connector's tools whenever your question relates to that service. A question about your site's speed or settings is enough for it to read your sites through the Hub. Reads change nothing, but say read only if you do not want a proposal that leads to a write.

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.

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.

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.

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.

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.

09

Keep going

Tune cache settings with other agents

More with Grok

Documentation

From the blog

Tune cache settings, from Grok.

xSpeed Hub is free and has no site cap. Connect your sites once and ask from the agent you already use.