WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 1 down vote accepted

Take a look at

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

in wp-admin/includes/plugin.php

share|improve this answer
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 '11 at 21:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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