Activate a plugin
activate_pluginActivate an installed WordPress plugin, executing its code immediately. Test on staging first to prevent fatal errors from incompatible plugins.
Instructions
Activate an installed plugin. Activation runs the plugin's code immediately — a plugin incompatible with this WordPress or PHP version can fatal the site, so prefer testing on staging first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plugin | Yes | Plugin identifier, e.g. "akismet/akismet". | |
| 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. | |
| network_wide | No | Activate across a multisite network. |