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

Raise a WordPress site's PageSpeed score with ChatGPT

Raising a WordPress PageSpeed score with ChatGPT means asking in the chat for an xSpeed optimization pass, reading the preview it brings back from xSpeed Hub, and confirming the pass that applies it.

list_sitesget_score_historylist_modulesoptimize_sitegenerate_critical_csspurge_cacherun_speed_test

Last updated: October 2026

Example session · ChatGPT

You: My store is slow on phones and the score is low. Can you improve it with xSpeed Hub?

list_sites read-only
→ 2 sites; store is store.example.com

optimize_site(site: store, aggressiveness: standard, dry_run: true) dry run
→ plan: 6 settings to apply (CSS minify, JS minify, defer JS, lazy-load images, compression, browser cache), nothing changed

ChatGPT: I previewed a standard pass. It would minify CSS and JavaScript, defer scripts, lazy-load images, turn on compression and set browser caching. Nothing has changed yet. Shall I apply it to store?

You: Yes, run it.

optimize_site(site: store, aggressiveness: standard) changes site
→ applied 5, undone 1 (broke the cart button), unfixable: 3 oversized product images

ChatGPT: Five settings are on and one was reverted because it broke the cart button. Product image size is on the unfixable list. Please open the cart page and a product page and tell me if either shows an error.

01

How ChatGPT handles this

In ChatGPT the job starts as a sentence in a conversation: my store is slow on phones, what can you do? Once xSpeed Hub is added as a developer-mode app, ChatGPT can list your sites, choose the store, and call optimize_site with dry_run on. Expect a confirmation for each Hub call, list_sites included. You get a plan back in the chat and nothing on the site has changed. Ask it to say which of the three levels it chose, safe, standard or aggressive, and why. Aggressive includes settings known to break some themes, so it is your call, not a default.

When you say go, ChatGPT calls optimize_site for real. The pass measures the site, applies each setting one at a time, checks the page after every change, and undoes anything that breaks it. Expect up to two minutes per site. You get what was applied, what was undone with the reason, and what is unfixable. If you named a number, such as ninety, ChatGPT can pass target_score and a round limit of up to three. That needs the Pro plugin on the site and costs a real PageSpeed measurement per round, so only name a number you mean.

Then comes the check. The Hub instructs the agent to look at the verify URLs before it says the pass worked, since the plugin sees HTML and cannot run JavaScript. If ChatGPT cannot open the pages, it should list them for you. Open them, watch the console, and tell it what you see. Treat the plan, your confirmation and that check as three separate steps, and do not skip the middle one.

02

Set up ChatGPT once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the ChatGPT 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.

2Turn on developer mode

In ChatGPT on the web, open Settings, then Security and login, and turn on Developer mode. On a Business workspace only admins and owners can use it. On Enterprise and Edu an admin grants access first, and you then turn it on under Settings, Apps, Advanced settings.

Text
Settings  >  Security and login  >  Developer mode

3Create the app from the Hub URL

Open ChatGPT Plugins, select the plus button and create a developer-mode app. Name it xspeedhub, paste the MCP server URL and choose OAuth. Click Scan Tools, approve access on the xSpeed Hub page that opens, wait for the scan to list the tools, then click Create. Workspace admins can also start from Workspace settings, Apps, Create.

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

4Select the app in a chat

The app appears under Drafts in your app settings with a Dev label. In a new chat, open the plus menu in the composer, choose Developer mode and select xspeedhub. In a workspace, only an admin or owner can publish the app for other members.

Text
+  >  Developer mode  >  xspeedhub
1 / 4

Full ChatGPT 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. ChatGPT asks you to confirm write actions by default. You can expand a tool call to read the JSON it will send, and you can choose to remember an approve or deny choice for a tool for the rest of that conversation. ChatGPT respects a tool's read-only annotation and treats a tool without one as a write action; xSpeed Hub's tool definitions do not declare that annotation today, so expect confirmations on reads as well. OpenAI says confirmation also depends on app permissions and context, and some especially risky actions can be blocked. xSpeed Hub has no confirmation step of its own, so once you tell ChatGPT to remember Approve for a tool, that tool runs without a prompt for the rest of the conversation, as soon as your connection allows writes.

03

What do I ask?

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

Prompt for ChatGPT
My store scores low on mobile. Use xSpeed Hub to preview an optimization at the standard level and explain each change before applying anything.
Prompt for ChatGPT
With xSpeed Hub, apply the plan to the store. If it hits something it cannot fix, tell me what instead of retrying.
Prompt for ChatGPT
Using xSpeed Hub, get the store to 90 with a Pro target score, but tell me how many rounds you plan to run first.
04

What happens, step by step

optimize_site is the Hub tool for "make my site faster". It measures the site, applies the recommended xSpeed settings one at a time, checks the page still renders after each change, undoes anything that breaks it, and reports what it applied, what it undid and what it could not fix. It reaches caching and asset delivery only. Page weight, images hosted on another domain and heavy video are outside it, and the report says so instead of claiming a win.

01

See where the site stands

The agent reads get_score_history for the last stored scores and list_modules for which modules exist on that site and what state they are in. Neither changes anything.

02

Preview with dry_run

optimize_site with dry_run: true returns the plan: each change and its tier, what would be skipped (already on, or needing a higher aggressiveness) and what it cannot fix. Nothing is applied. The tool description tells the agent to prefer this before the first real run on a site you have not optimized before.

03

Apply it

optimize_site without dry_run applies the plan. aggressiveness is safe (removals and server-side changes only), standard (the default) or aggressive, which includes settings known to break some themes and should be opted into deliberately. A run can take up to about 2 minutes per site.

04

Look at the site afterwards

When changes were applied, the result carries verify_urls and a note. The site checks its own HTML and reverts anything that breaks it, but it cannot run JavaScript, so verified: true does not prove the page works in a browser. The Hub tells the agent to open those URLs and check the page renders and the console is clean, or to tell you which URLs to check.

05

Reach for a number only if you named one

target_score (1 to 100, Pro sites only) turns one pass into repeated rounds toward that score, up to max_rounds, with 3 as the most per site. Each round is a real PageSpeed measurement and up to about 2 minutes. The result says why it stopped, and diminishing returns means what is left is outside what caching can reach.

06

Critical CSS on Pro sites

generate_critical_css generates above-the-fold CSS so the first screen can paint without waiting for the full stylesheets. It needs the Pro Critical CSS module on that site, and the site answers with an unknown-tool error without it. Pages are rebuilt with it on their next build, so the agent purges the cache afterwards.

05

Reference

Main tooloptimize_site (write): measure, apply one setting at a time, verify, undo what breaks, re-measure
Previewdry_run: true returns the plan and changes nothing
aggressivenesssafe, standard (default) or aggressive
Every site at oncesite: "all" or a list of handles, one result per site, sites run one after another; the Hub's confirm-once instruction does not name optimize_site, so your client's prompt is the gate
TimeUp to about 2 minutes per site
target_score1 to 100; needs Pro on the site; without it the site runs one pass and says so
max_roundsUp to 3 per site; only sent along with target_score; 12 rounds in total per call
Wide fan-out with a targetEach site gets fewer rounds, and the result carries a note saying so
Result fieldsapplied, skipped, reverted, unfixable, score, verified, rounds; verify_urls after a run that changed something
Already tuned siteReturns "everything is already on" plus what it cannot fix; that is an answer, not a failure
Critical CSSgenerate_critical_css (write), Pro Critical CSS module required; purge_cache afterwards
Read-only connectionoptimize_site and generate_critical_css are refused; dry_run is still a write call, so it is refused too. Applies to the connection token with Read-only everywhere on and to a Viewer sign-in, not to other OAuth sign-ins
06

Rules worth keeping

  • Run dry_run first. optimize_site changes live site settings as soon as your connection allows writes. The tool description tells the agent to preview first on a site that has not been optimized, but that is guidance, 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 real gates.
  • Keep aggressive for a deliberate choice. It includes settings known to break some themes, and the agent should say so before using it.
  • After a run that changed something, open the pages in verify_urls. The HTML checks cannot run JavaScript, so a page can pass them and still be broken in a browser. Do not call a run safe because verified is true.
  • Relay the unfixable list. When a site is already tuned, the honest answer is that caching is done and the rest is page weight, hotlinked images or DOM size. The agent should not retry the tool or claim a gain it did not make.
  • Only ask for target_score when you want the site driven to a number. Each round costs a real PageSpeed measurement, and a plain "make it faster" is one pass.

Good to know with ChatGPT

ChatGPT treats a tool without a read-only annotation as a write action, and the Hub's tools carry no such annotation, so every Hub call asks for confirmation, reads included. You can expand a call to read the JSON it will send. If you tell ChatGPT to remember Approve for optimize_site after the preview, the real pass follows without a prompt for the rest of that conversation, because the dry run and the real pass are the same tool. ChatGPT custom apps work on the web only, and OpenAI says agent mode does not use them. OpenAI's pages differ on plans, and the help center says Pro accounts connect with read and fetch permissions, so if only the read tools appear, your plan is the likely reason. The Hub also classes optimize_site as a write tool even with dry_run on, so a read-only sign-in refuses the preview too. ChatGPT signs in with OAuth and gets the scopes it asks for, and the Hub's Read-only everywhere switch applies only to the connection token, which ChatGPT cannot send. For read-only access, sign in as a Viewer member of the workspace, or keep ChatGPT's own confirmations on.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Ask xSpeed Hub to preview what optimize_site would change on shop with a safe pass. Do not apply anything.
Prompt
Use xSpeed Hub to optimize the blog site with the standard pass, then give me the pages to check by hand.
Prompt
With xSpeed Hub, get docs to a mobile PageSpeed score of 90 if you can, and tell me why it stopped if it does not get there.
Prompt
Use xSpeed Hub to show me what optimize_site would do on every site, as a dry run, and list which sites have the most left to change.
Prompt
Use xSpeed Hub to generate critical CSS for shop, then purge the cache so the pages are rebuilt with it.
Prompt
With xSpeed Hub, optimize shop, then compare the new PageSpeed score with the last stored one.
Prompt
Using xSpeed Hub, what could optimize_site not fix on the shop site?
08

Frequently asked questions

Yes, once xSpeed Hub is added as a developer-mode app on the web and your plan allows write actions from it. Pick the app in the chat, ask for a dry run first so you see the plan, then confirm the real pass.

Most often you signed in as a Viewer member, whose access is always read-only, or your plan limits write actions from custom apps. OpenAI's help center describes Pro accounts as read and fetch only. The Hub treats optimize_site as a write tool even in dry run, so either restriction blocks the preview as well as the real pass.

It measures the site, applies the recommended xSpeed settings one at a time, checks that the page still renders after each change, and undoes any change that breaks it. It then reports what was applied, skipped and reverted, and what it could not fix. It reaches caching and asset delivery only.

Yes, especially on a site you have not optimized before. dry_run: true returns the plan, what would be skipped and what cannot be fixed, and changes nothing. The tool description tells the agent to prefer it, but nothing forces it, so say so in your prompt if you want a preview.

Yes, with target_score, on a site that has xSpeed Pro. It repeats measure, apply and re-measure for up to 3 rounds per site and stops early when rounds stop helping, saying why. On a Free site the score target is ignored and you get a single pass with a note that no iterative tuner is installed.

That is a real answer. The settings it can apply were already enabled, so there was nothing to change. The result also lists what it could not fix, such as page weight, images hosted on another domain or DOM size, and those need changes outside a caching plugin.

The site checks its own HTML after each change and reverts anything that breaks it, but it cannot run JavaScript. After a run that changed something, the Hub tells the agent to open the returned verify_urls and check the page renders and the console is clean, or to give you the URLs to check yourself.

No. It needs the Pro Critical CSS module on that site, and without it the site answers with an unknown-tool error. On a Pro site, purge the cache afterwards, because pages already cached were built without the critical CSS.

09

Keep going

Raise the PageSpeed score with other agents

More with ChatGPT

Documentation

From the blog

Raise the PageSpeed score, from ChatGPT.

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