rank-math/refresh-llms-route checks whether Rank Math’s llms.txt rewrite rule is present in the persisted rules, and flushes them only if it is missing.
It reports the state before and after, which is what makes the result diagnostic rather than merely successful.
At a glance
| Ability | rank-math/refresh-llms-route |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Sitemaps & llms.txt |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Writes data |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
Conditional, and reported both ways
Flushing rewrite rules is not free — WordPress regenerates every rule on the site and writes them back — so doing it unconditionally on a call that is often a no-op is wasteful, and on a large site with many custom post types it is noticeable.
So the rule is checked first. When it is already present, nothing happens and the response says so.
The before-and-after reporting is the more useful half. A flush that runs and does not restore the rule is telling you something specific: the rule is not being registered at all, which means the module is off rather than the rules being stale.
Without that distinction, a failed repair looks identical to a successful one and the next step is guesswork. With it, the next step is rank-math/set-module-state.
Idempotent by design.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
rule_present_before | boolean | Whether the rule existed before. |
flushed | boolean | Whether a flush was performed. |
rule_present_after | boolean | Whether the rule exists now. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Our llms.txt is 404ing — fix the route.
It resolves to one call:
{
"ability": "rank-math/refresh-llms-route",
"parameters": {}
}Worth knowing
- Does nothing when the rule is already present.
- Flushed but still missing means the module is off, not the rules stale.
- Flushing rewrite rules is expensive on large sites, which is why it is conditional.
- Idempotent.
Related abilities
- Get Rank Math llms.txt Status — diagnose before repairing
- Set Rank Math Module State — when the module is the problem
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category