Skip to content

Restore AI Changes from Change History ​

The Activity screen has no restore button. To restore an update or deletion recorded in Change history, use the wp_history_apply tool from a connected AI client.

Preview a Restore ​

  1. Use wp_history_get to read the Change history entry you want to restore.
  2. Call wp_history_apply with the entry's entry_id and dry_run: true.
  3. Review the planned tool calls, any fields that cannot be restored, and any changes made to the object since the entry was recorded. A dry run shows what the restore would do without applying it.

Apply a Restore ​

Run the same wp_history_apply request without dry_run: true. The restore uses the same tools as regular changes, so normal permissions and approval requirements still apply. If the AI client requests approval, review and approve the action there.

A restore can be partial: some tool calls may succeed while others are refused, awaiting approval, or unable to restore a field. Review the result for each call and the Change history entries to see what was actually restored. Creations are skipped; restoring a creation does not delete the object.

If the object has changed since the history entry was recorded, the restore is refused to protect those later changes. To proceed anyway, add force: true to the request. This can overwrite later changes, so use it only when you intend to replace them with the earlier values.

Was this helpful?