rank-math/reset-role-capabilities restores Rank Math’s default capability distribution for every role at once. It refuses without confirm: true.
There is no undo, so the response includes the before and after matrices.
Before you run it
This discards every capability customisation for every role at once, and there is no undo. Whatever access was deliberately granted or removed — an editor given redirection access, a role stripped of settings access — goes back to Rank Math’s defaults. The response includes the before and after matrices so the previous state can be reconstructed manually, and that is the only recovery path.
At a glance
| Ability | rank-math/reset-role-capabilities |
| Toolset | Rank Math — toolset/rank-math |
| Group | Rank Math › Modules & Permissions |
| Requires | Rank Math SEO, active on the site |
| Capability | manage_options |
| Safety | Destructive — deletes stored values, and refuses to run without confirm: true |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Returning the before matrix in the response is the compensation for the missing undo. It is not automatic recovery — reconstructing means applying capabilities one at a time with users/add-role-capability — but it is a complete record of what was there.
Read the current state first with rank-math/get-role-capabilities so the record exists before the call as well as after it.
This is not the same as the generic users/reset-role ability. That restores WordPress’s own defaults for a role, which would remove Rank Math’s capabilities entirely rather than resetting them to Rank Math’s defaults — a very different outcome with a very similar name.
The legitimate use is a site whose capability matrix has been edited into a state nobody understands. Resetting to a known baseline and re-granting deliberately is often faster than untangling it.
Idempotent.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
confirm | boolean | Yes — must be true | The irreversibility gate. Without it the call is refused before anything is touched. |
What comes back
| Name | Type | What it is |
|---|---|---|
before | object | The capability matrix before the reset. |
after | object | The matrix after it. |
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:
Reset the Rank Math role permissions to defaults.
It resolves to one call:
{
"ability": "rank-math/reset-role-capabilities",
"parameters": {
"confirm": true
}
}Worth knowing
- No undo. The before matrix in the response is the only record.
- Not the same as the generic role reset, which would remove Rank Math capabilities entirely.
- Read the matrix first so you have the record twice.
- Idempotent.
Related abilities
- Get Rank Math Role Capabilities — read before resetting
- Create Rank Math Settings Backup — backs up the role manager too
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category