Restore Theme Backup


Undoes a theme publish: puts back the files, templates, styles, patterns, logo and site icon exactly as they were before it, from the backup taken at the time, then checks the site loads. Defaults to the most recent publish. Needs confirm set to true.

Also known as: undo theme changes, roll back, revert publish.

Property Value
Ability slug mosmcp/theme-restore-backup
Wire tool name mosmcp__theme-restore-backup
Category Theme: Draft and Publish (mosmcp-theme-draft)
Plan Free

 

Required access

Requirement Value
Capability edit_theme_options
Minimum default role Administrator (Shop manager too when WooCommerce is active)
Annotations readOnly: false · destructive: true · idempotent: false · openWorld: false

 

Input schema

Field Type Required Default Description
backup_id string — Backup to restore, from mosmcp/theme-draft-status. Defaults to the most recent unrestored one.
confirm boolean — Must be true, set only after the person has agreed.

 

Output schema

Field Type Required
restored boolean Yes
backup_id string Yes
backup_taken string
files string[]
templates string[]
global_styles boolean
site_identity string[]
custom_css boolean
theme_settings string[]
health string
notes string[]

 

Example

Sample prompt
Undo the last theme publish and put my site back the way it was.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 312,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__theme-restore-backup",
    "arguments": {
      "input": {
        "confirm": true
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 312,
  "result": {
    "isError": false,
    "structuredContent": {
      "restored": true,
      "backup_id": "20260929-104512-d4e5f6",
      "backup_taken": "2026-09-29 10:45:12 UTC",
      "files": [
        "style.css"
      ],
      "templates": [
        "single"
      ],
      "global_styles": false,
      "health": "The live site loads normally: wp-admin, home page, newest post and newest page all render without a fatal error, signed in and for visitors.",
      "notes": []
    }
  }
}

 

Edge cases / errors

  • confirm not true → refused with mosmcp_confirmation_required; anything changed in the same places since the publish is overwritten.
  • Unknown backup_id, or no unrestored backup left → refused with mosmcp_theme_backup_not_found, pointing to mosmcp/theme-draft-status.
  • Backup belongs to a different theme than the active one → refused with mosmcp_theme_backup_other_theme.
  • The backup includes files and file editing is blocked → refused. If the site can't request its own pages, health says it was not re-checked.

 


<< Previous Next >>
Publish Theme Draft Theme Draft Status

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.