WordPress.org

Forums

Activating plugins outside of WordPress (4 posts)

  1. abrazell
    Member
    Posted 8 years ago #

    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?

  2. Austin Matzko
    Member
    Posted 8 years ago #

    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.

  3. abrazell
    Member
    Posted 8 years ago #

    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.

  4. Austin Matzko
    Member
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic