The MU forums have moved to WordPress.org

Activate a plugin on all blogs with PHP code (15 posts)

  1. moose123
    Member
    Posted 15 years ago #

    Hello all

    I am looking at the Power Tools plugin and I see that you can execute php code manually. I would like to use this to activate/deactivate plugins on a global basis (or per blog).

    I couldn't find anything in the codex about doing this, but I may have just not been able to find it. Does anyone have a reference for how to manage plugins this way? Is there an existing PHP function that I could use for this and just edit the arguments?

    Thanks in advance.
    Moose

  2. VentureMaker
    Member
    Posted 15 years ago #

    I used plugin commander to mass activate/deactivate plugins.
    However, if you've got many blogs (3000+ for example) you'll have to raise php memory limit considerably - to 256Mb in my case.
    But I did this once and then decreased it back :)

  3. moose123
    Member
    Posted 15 years ago #

    VentureMaker,

    Unfortunately, Plugin Commander broke when I upgraded to 2.6.5 and I can't figure out what the problem is. No errors are thrown. I just get a blank page below the dashboard when I try to use it. I only have about 200 blogs.

    Thanks,
    Moose

  4. macworkshop
    Member
    Posted 15 years ago #

    I had the same, Moose - now happily using the SVN trunk version though. Also see my post at http://mu.wordpress.org/forums/topic.php?id=8633

  5. moose123
    Member
    Posted 15 years ago #

    macworkshop,

    can you tell me a bit more about the SVN truck version of plugin commander? how might that fix the problem i'm having with it?

    specifically, the User Control works, but auto-activate, mass activate and mass deactivate don't work anymore.

    thanks a ton,
    moose

  6. macworkshop
    Member
    Posted 15 years ago #

    All I can tell you is that this version works beautifully with WPMU 2.7 - grab it here:

    http://firestats.cc/browser/trunk/plugin-commander

  7. moose123
    Member
    Posted 15 years ago #

    Ok, thanks macworkshop.

  8. andrea_r
    Moderator
    Posted 15 years ago #

    Gah, I wish they'd keep these things all in one place. :D

  9. macworkshop
    Member
    Posted 15 years ago #

  10. moose123
    Member
    Posted 15 years ago #

    How about this...can I activate a plugins for *individual* blogs somehow?

    For example, I'd like to allow people to use the wpng-calendar plugin, but not until they get their own Google API key. Otherwise, if I make the plugin available to all blogs and they activate without configuring their own version with their own key, it throws an error when their site loads.

    I suppose I could add a message to the plugin description that they must to this before activating the plugin, but controlling the plugin on a per-blog basis would be best.

    Thanks,
    Moose

  11. macworkshop
    Member
    Posted 15 years ago #

    @moose123:

    Yes, absolutely. Use Plugin Commander to control what gets seen by blog admins. Don't enable user control for wpng-calendar.

    If you want a particular blog to have access to it, or any other installed plugin (plugins folder, NOT mu-plugins), head to [Site Admin > Blogs] and choose "Backend" for that blog. You as site admin can see and activate/deactivate all installed plugins.

    Works for me! :o)

  12. moose123
    Member
    Posted 15 years ago #

    macworkshop,

    thanks so much for your help! this works!

    moose

  13. macworkshop
    Member
    Posted 15 years ago #

    No worries moose - bear in mind that this will all be built in soon. :o)

  14. pandusetiawan
    Member
    Posted 15 years ago #

    How to use plugin-commander?
    I copy the plugin-commander.php into mu-plugins folder, but when i go to Dashboard->Plugins, it shows the content of plugin-commander.php.

    I'm using wpmu 2.7
    Thx in advanced.

  15. VentureMaker
    Member
    Posted 15 years ago #

    you need to disable the built-in plugins menu (through Site Admin->Options->Menus)

About this Topic

  • Started 15 years ago by moose123
  • Latest reply from VentureMaker