Restore a revision
restore_revisionRestore a post or page to a selected revision, replacing its title, content, and excerpt while preserving status, publish date, slug, categories, and tags.
Instructions
Restore a post or page to one of its revisions: its title, content and excerpt are replaced with the revision's. The status, publish date, slug, categories and tags are not changed, so a published post stays published with the restored content. The restore can usually be undone the same way, because WordPress keeps the previous content as a revision when revisions are enabled; depending on the site's revision settings it may not be kept, so read the current content with get_post first if it must be kept. Returns the post's ID, title and the restored revision.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"post_id": "<post_id>",
"revision_id": "<revision_id>"
},
"name": "restore_revision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_id | Yes | Post or page ID | |
| post_type | No | Post type of post_id: 'post' (the default), 'page', or an allowed custom post type. | post |
| revision_id | Yes | Revision ID to restore, from get_revisions |