wp_deactivate_plugin
Deactivate a WordPress plugin with a dry-run preview first. Avoid taking site functions offline by checking impacts before applying changes.
Instructions
Deactivate one plugin: this can take site functionality OFFLINE immediately.
DEACTIVATING A LIVE PLUGIN TAKES WHATEVER IT PROVIDES OFFLINE the instant it lands -
forms stop submitting, caching stops serving, security rules stop applying, and
page builders stop rendering their layouts (a Divi/Elementor page can come back as
raw shortcodes). Check what the plugin does before calling this, and prefer staging.
Deactivating wp-ops-connect is REFUSED outright: it is the control-plane plugin this
tool reaches the site through, so deactivating it would sever this tool's own
connection to the site and nothing here could re-activate it. plugin may be a slug
('akismet'), a plugin file ('akismet/akismet') or its .php path; a slug matching two
installed plugins is refused with the candidates rather than guessed. A plugin that
is already inactive comes back as a no-op, not an error. DEFAULTS TO dry_run=true
(returns a preview naming the plugin, its current status and what would change;
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.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plugin | Yes | ||
| dry_run | No | ||
| install | Yes | ||
| allow_prod | No |