Roll Back Theme

versions/rollback-theme moves an installed theme onto any version WordPress.org published, in either direction — the theme half of version targeting.

Customizer settings, content and child themes are untouched, because WordPress stores all of those outside the theme folder. Files edited inside the theme’s own folder are replaced, which is usually the point.

At a glance

Abilityversions/rollback-theme
ToolsetWP Rollback — toolset/wp-rollback
GroupVersion Targeting › Rollback
RequiresNothing. WP Rollback is optional and adds local archives only
Capabilitymanage_options and update_themes
SafetyDestructive — replaces the theme’s files. Requires confirm: true, and force: true for the active theme
RepeatableIdempotent
HonoursDISALLOW_FILE_MODS
Ships inAcrossAI Abilities Manager 0.0.45 and later

Two flags, not one

The active theme needs force: true as well as confirm: true, and they are separate on purpose.

confirm says “I accept a version change”. force says “I accept that this one is live”. Folding them into one flag would let somebody tidying up a dormant theme change what the site looks like to visitors with the same single argument — and a theme whose templates changed between versions can alter a site’s appearance in ways no setting records.

Input

NameTypeRequiredWhat it is
stylesheetstringYesTheme directory name, e.g. twentytwenty.
versionstringYesThe version to move to. versions/list-asset-versions returns the valid values.
confirmbooleanYes, in practiceMust be true.
forcebooleanOnly for the active themeRequired when this is the theme visitors currently see.

What comes back

NameTypeWhat it is
previous_version / versionstringBefore and after.
relationstringolder or newer.
changedbooleanFalse when it was already on that version.
is_active_themebooleanWhether this change is live for visitors right now.
package_sourcestringwordpress.org or local_archive.
warningsarrayIncluding that a downgrade will be offered again at the next update check.
verify_hintstringNotes that WordPress.org publishes no theme checksum manifest, so there is no theme equivalent of the plugin checksum check.
error_codestringactive_theme_requires_force when force was needed and omitted.

Example

Ask your assistant:

Put Twenty Eleven back on 5.1 — the new version broke the header.

{
  "ability": "versions/rollback-theme",
  "parameters": {
    "stylesheet": "twentyeleven",
    "version": "5.1",
    "confirm": true
  }
}

If that is the active theme, add "force": true.

Worth knowing

  • Child themes live in their own folder and are not touched. Rolling back a parent can still change how a child renders, if the child relies on templates the parent changed.
  • Customizer settings and template edits are stored in the database, not the theme folder, so they survive.
  • A downgrade does not stick — the next update check offers the newer version again.
  • There is no theme checksum manifest on WordPress.org, so files cannot be verified against the directory the way a plugin’s can.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading