30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Reset Rank Math Role Capabilities

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

Abilityrank-math/reset-role-capabilities
ToolsetRank Math — toolset/rank-math
GroupRank Math › Modules & Permissions
RequiresRank Math SEO, active on the site
Capabilitymanage_options
SafetyDestructive — deletes stored values, and refuses to run without confirm: true
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI 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

NameTypeRequiredWhat it is
confirmbooleanYes — must be trueThe irreversibility gate. Without it the call is refused before anything is touched.

What comes back

NameTypeWhat it is
beforeobjectThe capability matrix before the reset.
afterobjectThe matrix after it.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent 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 the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading