Install a plugin from a ZIP
wp_install_plugin_zipInstall a WordPress plugin from a ZIP archive using base64 content or a public URL, with optional activation and a preview-confirm step to prevent unintended changes.
Instructions
Install a plugin from a ZIP archive: base64 "content" or a public http(s) "url" the site downloads, each up to 30 MB by default; where AlphaBridge MCP Pro is active, also a committed upload "session" of its chunked uploads, for larger archives. A session given is used first, then content, then url. Optionally activates it. Plugins from the WordPress.org directory are installed by slug with wp_install_plugin. Needs install_plugins (and activate_plugins for activate; without it activated stays false); refused when DISALLOW_FILE_MODS is set. Returns installed, plugin (its file) and activated, plus what the activation check reports; no undo point is recorded. Where the plugin's folder exists already, nothing is changed and the answer names the version installed, so a repeated call installs nothing twice; an installed plugin is brought to a newer version with wp_update_plugin. With activate, the activation is checked as with wp_activate_plugin and wp_activate_theme: where the site does worse with it active, it is taken back in the same call, and the answer, an error, names the error with file and line; what was installed stays installed. Runs in two steps: a call without confirm_token changes nothing and returns a preview with a confirm_token, and the same call with that token runs it. This guards against a call nobody meant; it does not make the change reversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public http or https address of a plugin .zip; the site downloads it (up to 30 MB by default, three redirects). Used when neither session nor content is given. | |
| content | No | Base64-encoded plugin .zip, up to 30 MB by default (filter ab_mcp_install_max_bytes). | |
| session | No | Id of a committed chunked-upload session of AlphaBridge MCP Pro holding the .zip, for archives over the content and url limit; used first when given. Refused where Pro is not active. | |
| activate | No | true activates the plugin after install (needs activate_plugins). Default false. | |
| confirm_token | No | Confirmation from the preview: a call without it changes nothing and answers with a preview and a confirm_token, and the same arguments with that token run the tool. A token is valid for 10 minutes and only while what it covers is unchanged. |