Restore a plugin option from backup
restore_plugin_settingsRestore a WordPress plugin option to a previously saved value with preview and confirmation. Roll back a settings change that broke something.
Instructions
Restore an option to a value saved before an update_plugin_settings write. Every write keeps the last five previous values; by default this restores the most recent. The first call previews the current value next to the one that would be restored and returns a confirm_token; the second applies it. The current value is itself backed up first, so a restore is undoable. Use this to roll back a settings change that broke something.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| option | Yes | The option name to restore. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| backup_index | No | Which backup to restore (0 = oldest kept). Omit for the most recent. | |
| confirm_token | No | Token from the preview. Omit it first to see the current value next to the one that would be restored. |