activate_plugins ( $plugins, $redirect = '', $network_wide = false, $silent = false )

  • (string|string[]) plugins Single plugin or list of plugins to activate.
  • (string) redirect Redirect to page after successful activation.
  • (bool) network_wide Whether to enable the plugin for all sites in the network. Default false.
  • (bool) silent Prevent calling activation hooks. Default false.
  • (true|WP_Error) True when finished or WP_Error if there were errors during a plugin activation.
Defined at:


Activates multiple plugins.When WP_Error is returned, it does not mean that one of the plugins had errors. It means that one or more of the plugin file paths were invalid. The execution will be halted as soon as one of the plugins has an error.

Related Functions

activate_plugin, deactivate_plugins, wp_ajax_activate_plugin, deactivated_plugins_notice, activate_sitewide_plugin

Top Google Results

User discussions

wpseek mobile