Can one plugin activate another plugin via script?

I know its possible to deactivate known plugins via script, but can't find any examples of how to activate them.


1 Answer 1


Take a look at

function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false );

in wp-admin/includes/plugin.php

  • Thanks Bainternet! I don't think I'll need this now after all, since I found the solution (wordpress.stackexchange.com/questions/15143/…) to the problem that I was going to use this as a workaround for, but it will definitely come in handy in the future.
    – Scott B
    Apr 19, 2011 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.