Clean up options and transients
cleanup_optionsClean up your WordPress options table by deleting expired transients, disabling autoload for named options, or removing specific options. Preview changes in a dry run, then apply with a confirmation token.
Instructions
Reduce options-table weight in one of three ways: delete_expired_transients (expired transients and site transients, plus timeout rows whose value is gone), set_autoload_off (stop loading named options on every request — they remain readable on demand), or delete_options (remove named options). Always two steps: the first call is a dry run that returns exactly what would change, the bytes saved, what was refused and a confirm_token; repeat the identical call with that token to apply it. Core WordPress options, wpxmcp's own state and lock-out options (siteurl, active_plugins, user roles, salts…) are refused. Deleting an option a plugin still uses resets that plugin's setting, so check owners in inspect_options first. Needs the companion plugin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | Option names for set_autoload_off or delete_options, exactly as listed by inspect_options. Ignored for delete_expired_transients. | |
| action | Yes | delete_expired_transients, set_autoload_off (needs names) or delete_options (needs names). | |
| 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. | |
| confirm_token | No | Token from this tool's dry-run preview. Omit it to preview; pass it back with identical action and names to apply. |