Support » Fixing WordPress » Activating plugins outside of WordPress

  • Is there anyway to activate/deactivate plugins outside of the WordPress wp-admin? For instance, if I wanted to setup an external script to manage certain plugin aspects of our infrastructure (125+ blogs), is there an easy way to do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t know if this is “easy,” but the list of active plugins is stored in a serialized array in the option “active_plugins” in the options table. By removing/adding the plugin from/to that array, you could deactivate/activate the plugin.

    Yeah I was thinking about that too. I wonder what the API requirements would be though, if any. I mean, is it as simple as adding a plugin to the array and re-serializing or are there othere API callst hat are made too to do it properly in the context of WordPress. HAven’t looked at the WP core code to find out yet.

    Yes, there is the action ‘activate_’ . plugin_name that happens when a plugin is activated, but I don’t think there are any that happen when a plugin is deactivated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Activating plugins outside of WordPress’ is closed to new replies.