wp_activate_plugin
Activate an installed WordPress plugin, defaulting to a dry-run preview; require allow_prod for live production writes.
Instructions
Activate one already-installed plugin.
ACTIVATING AN UNTESTED PLUGIN CAN BREAK A LIVE SITE: the activation hook runs
immediately and can fatal, and the plugin starts filtering the site's output the
moment it loads. Activate on staging first. plugin may be a slug ('akismet'), a
plugin file ('akismet/akismet') or its .php path - all three resolve to the same
plugin, and a slug matching two installed plugins is refused with the candidates
rather than guessed. A plugin that is already active comes back as a no-op, not an
error. DEFAULTS TO dry_run=true (returns a preview naming the plugin and its current
status; changes nothing). Pass dry_run=false to apply - the change is verified by
re-reading the plugin's status. Requires the REST transport. Prod writes require
allow_prod=true.
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": {
"install": "<install>",
"plugin": "<plugin>"
},
"name": "wp_activate_plugin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plugin | Yes | ||
| dry_run | No | ||
| install | Yes | ||
| allow_prod | No |