Delete a plugin
wp_delete_pluginPermanently remove an installed WordPress plugin by its file path, previewing the change with a confirm token first; an active plugin is deactivated and its uninstall routine runs.
Instructions
Delete an installed plugin by its file path as wp_list_plugins lists it (e.g. akismet/akismet.php); an active plugin is deactivated first, and WordPress runs the plugin's uninstall routine, which can remove its settings and data. Permanent: no undo point is recorded; switching a plugin off without removing it is wp_deactivate_plugin. Returns deleted and plugin. Needs delete_plugins; refused when DISALLOW_FILE_MODS is set. AlphaBridge itself (AlphaBridge MCP, AlphaBridge MCP Pro, the owner drop-in) is refused here, because deleting it would end this connection or take tools away from it, and its uninstall can remove the connections, settings and undo points as well; it is deleted in wp-admin under Plugins. 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 |
|---|---|---|---|
| plugin | Yes | Exact plugin file of an installed plugin as wp_list_plugins lists it, e.g. "akismet/akismet.php". A folder name alone or an unknown file is refused. | |
| 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. |