Activate a plugin
wp_activate_pluginActivate an installed plugin on this site, named by its file as wp_list_plugins lists it (e.g. akismet/akismet.php); installing is wp_install_plugin, network-wide activation on a multisite network wp_network_activate_plugin. Needs activate_plugins. A plugin taken back after a failed check is deactivated without its deactivation routine, as WordPress does after a fatal error. Activating is checked like an update: test requests check the home page, this MCP endpoint, wp-admin/admin-post.php and the dashboard before and after, logged in as this connection's account (where a security plugin refuses that login, the dashboard is left out and the answer says so). Where a target then shows a new fatal error, stops answering, or this MCP endpoint loses its own answer, the activation is taken back in the same call; the answer, an error, names the error with file and line, and the files stay as they are, so a corrected version can be activated again. Code has to let WordPress finish every request: code that ends the answer itself (fastcgi_finish_request(), or exit in the shutdown action) is taken back too, since the test cannot tell it from a broken one, and background work belongs in WP-Cron. A fatal error that was there before keeps the activation with a warning; a site that cannot reach itself is activated without a test, with the warning "not checked". Where code on every request filters the active plugins or the theme, so the site does not load what WordPress lists as active, the answer says so and the list stays as it was. One activation, update or deploy into running code runs at a time; a second is refused and changes nothing. Not checked: other wp-admin screens, cron, AJAX, code that runs only on some pages or for other users; what an activation routine writes to the database stays. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plugin | Yes | Plugin identifier as wp_list_plugins returns it in file: folder and main file, e.g. "akismet/akismet.php" (a single-file plugin as "hello.php"). |