Reinstall Theme

themes/reinstall-theme re-downloads and re-applies the official WordPress.org package for the version a theme is already on, repairing files that have been altered or lost without changing the version.

Unlike a rollback, this works on the active theme and needs no force flag — the version does not change, so the files that arrive are the ones the site is already running.

At a glance

Abilitythemes/reinstall-theme
ToolsetUpdates — toolset/updates
GroupVersion Targeting › Reinstall
RequiresNothing. The theme must be published on WordPress.org
Capabilitymanage_options and update_themes
SafetyDestructive — replaces files on disk. The version does not change
RepeatableIdempotent — safe to re-run
HonoursDISALLOW_FILE_MODS
Ships inAcrossAI Abilities Manager 0.0.45 and later

What survives, and what does not

Customisations are safe only because WordPress stores them outside the theme directory — Customizer settings in options, template edits in the database. Those survive.

A child theme is a separate directory and is not touched at all.

Files edited directly inside this theme’s own folder are exactly what this ability is for, and they will be replaced. That is the point — but if somebody hand-edited the parent theme instead of using a child theme, this undoes it.

Input

NameTypeRequiredWhat it is
stylesheetstringYesThe theme directory name, e.g. twentytwentyfive.

What comes back

NameTypeWhat it is
reinstalledbooleanWhether the package was applied.
versionstringThe version re-applied — the same one that was installed.
stylesheet / theme_namestringThe theme as resolved.
was_activebooleanWhether this is the live theme.
error_codestringversion_not_published, not_on_wordpress_org, reinstall_failed and similar.
blocked_reasonstringPresent when DISALLOW_FILE_MODS stopped it.

Example

Ask your assistant:

Something has mangled my theme’s files — restore them from the original.

{
  "ability": "themes/reinstall-theme",
  "parameters": {
    "stylesheet": "twentytwentyfive"
  }
}

Worth knowing

  • The swap runs behind maintenance mode, and the previous copy is restored automatically if the package fails to apply — WordPress core’s own mechanism, not ours.
  • WordPress.org publishes no theme checksum manifest, so unlike plugins there is no way to detect an altered theme first. If you suspect file damage, reinstalling is the direct answer.
  • A premium or privately-hosted theme has no official package to re-apply.
  • No confirm flag, matching core/reinstall-wp-core: the version does not change.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading