Plugin Management

One of the new features in the upcoming WordPress 2.2 release is an option to “Deactivate All Plugins” with one click. Our standard advice is to deactivate all your plugins before upgrading so that out-of-date plugins won’t break your system mid-upgrade. But in the past, you had to deactivate plugins one at a time. Thus the new “Deactivate All Plugins” button to make this easier.

While testing some things on my development system, I was frustrated that after an upgrade, I still had to reactivate my plugins one by one. So I threw together a “Reactivate All Plugins” feature, which I hope will be implemented for the release of WordPress 2.2.

With this patch, when you use “Deactivate All Plugins”, your current active plugins list is saved. Then later, when you attempt to “Reactivate All Plugins”, it will check each plugin one-by-one. The worst that could happen is if one of your old plugins throws a PHP fatal error, then the reactivation is aborted, and no plugins are reactivated. Simpler errors, like a plugin being deleted from disk between the deactivation and reactivation, are handled more gracefully — the valid plugins will be reactivated, and the missing ones will be reported to you.

Other Posts of Interest

24 Comments

  1. Posted 4/20/2007 at 2:23 pm | Permalink

    Hah! Thank you. I can’t even begin to stress that enough. :D It’s one of the features I’ve been hoping WP would implement.

  2. Posted 4/20/2007 at 2:51 pm | Permalink

    Ditto Shari. I’m an early upgrader that uses at least a dozen plugins so every time a new stable release comes out, it always becomes a matter of laziness and a state of being hassle-free versus security, bug fixes, and enhancements. This would really help, of course at least after I’m already on 2.2. Thank you. :)

  3. Posted 4/20/2007 at 3:06 pm | Permalink

    I hope it makes it in. One reason I’ve skipped that step in my last too updates was the number of plugins I use. I had replaced files, ran the upgrade script and hoped for the best. (And yes one upgrade I spent a week tracking down broken plugins and looking for upgraded plugins)

  4. Posted 4/20/2007 at 3:18 pm | Permalink

    Great idea. My plugins directory is getting very sloppy with almost as many deactivated plugins as activated ones. Worst part of upgrading is making an inventory of active plugins.

  5. Posted 4/20/2007 at 3:48 pm | Permalink

    great idea, might come handy in case of an error!

  6. Posted 4/20/2007 at 6:15 pm | Permalink

    I agree, this is a Godsend from Heaven.

    The next feature to build into WP-core is the ability to upgrade WP from within the admin page :)

  7. Posted 4/20/2007 at 6:19 pm | Permalink

    I created this code a while ago. I was making an plugin, but I never finished it. :-)

  8. Posted 4/20/2007 at 6:20 pm | Permalink

    Wow … so simple, yet so powerful. I’m surprised someone didn’t think of this before :P

    Thanks!

  9. Posted 4/20/2007 at 6:47 pm | Permalink

    That’s a good idea! :-D

  10. Posted 4/20/2007 at 7:04 pm | Permalink

    I should buy you another set of hockey tickets for this! You have no idea how handy this is for me, Dougal.

  11. Posted 4/20/2007 at 7:13 pm | Permalink

    Dougal, it would be nice to see this feature as built-in support and will reduce the upload of another plugin.

    I’m using a plugin on my WordPress 2.1.3 to Deactivate / Reactivate plugins all at the same time.

    If any one interested check this post for more info.

    DG…
    htpp://www.ditii.com

  12. Posted 4/20/2007 at 8:31 pm | Permalink

    Very cool idea. If I might suggest one modification that shouldn’t be too much extra work.

    It would be very useful it WordPress made a list someplace of the plugins it was deactivating with one click so later on your “reactivate” plugin can read that list and just reactivate the plugins that were deactivated to begin with.

    That way for plugin happy fools like me who have 20 active plugins and 30 inactive ones we don’t have to go through the pain (from a very slow connection) of deactivating plugins that we don’t need, or that will throw code errors when activated and hence defeat the purpose of reactivating the plugins anyway since it will abort the entire sequence.

    Again, thank you for all of your hard work and the very useful information you provide here.

  13. Posted 4/20/2007 at 9:48 pm | Permalink

    Sweet! Andrew Ferguson is currently rummaging through my files to find what plug-in won’t play nice with his countdown plug-in, and both of these features may have prevented this problem. Wheeeeeee!!!

  14. Posted 4/20/2007 at 11:35 pm | Permalink

    Yea, but the thing is, what if the upgrade goes good, but when you go to turn the plugins back on, they either break you WP or they go funky on themselves and don’t work. See!! xD

  15. Posted 4/21/2007 at 12:07 am | Permalink

    Too cool! I can’t tell you how many times I’ve forgotten to deactivate plugins and messed up my upgrade. This will be a great time-saver as will the reactivation! Hope it makes it in.

    Thanks

  16. Posted 4/21/2007 at 8:26 am | Permalink

    It would be very useful it WordPress made a list someplace of the plugins it was deactivating with one click so later on your “reactivate” plugin can read that list and just reactivate the plugins that were deactivated to begin with.

    That’s exactly how it works. When you “Deactivate All Plugins”, it saves the list of your currently active plugins. Later, when you “Reactivate”, it only reactivates the batch that you previously had turned on.

    Yea, but the thing is, what if the upgrade goes good, but when you go to turn the plugins back on, they either break you WP or they go funky on themselves and don’t work.

    In PHP 4 there’s not really much we can due to trap all errors gracefully. But the plugin system in WP 2.2 does have a way to detect when a plugin generates a fatal error and recover. This system does its best to avoid breaking your site due to activation of a broken plugin.

  17. Posted 4/21/2007 at 8:01 pm | Permalink

    It would be great if you could give each plugin a checkbox so you could select precisely which ones you want to activate or deactivate and then the corresponding buttons of course.

  18. Posted 4/22/2007 at 8:18 am | Permalink

    Dave, I’ve been reading this conversation, whatever has been suggested is all there in a WordPress plugin that I use on my blog:

    1. Checkbox option.
    2. Exporting a list of plugins.
    3. Deactivating/re-activating all pluging at one click.
    4. Deactivating/re-activating all checked plugins at one clcik.

    I hope WordPress Dev team implement all these functionalities in WordPress 2.2.

    You can find the plugin here.

    DG…
    http://www.ditii.com

  19. Posted 4/24/2007 at 4:45 am | Permalink

    Thanks a lot for this feature; it’s time-saving, of course, which makes it beautiful.

  20. Posted 4/25/2007 at 3:10 pm | Permalink

    All this talk all over the web, about the Wordpress plug ins and I can’t find the one that tells me how to add a pay pal shopping cart.

    Samuel B. Allen

  21. Posted 4/25/2007 at 4:45 pm | Permalink

    That’s going to be awesome for those days when we have to run WordPress updates. Good feature!

  22. Posted 5/4/2007 at 2:00 am | Permalink

    Hello,

    If you can’t wait for WP 2.2, this plugin will do exactly that!

    http://www.wptextads.com/blog/2007/05/04/1-click-to-stop-start-plugins/

    1 click to stop all plugins, and 1 click to reactivate the deactivated plugins

    cheers!

  23. Posted 5/12/2007 at 4:23 pm | Permalink

    thats a very useful feature….and i agree with johnathans comment no. 6 about the ability to update from the admin panel…..so when is the long due update on the wp dashboard comming? I cant wait to organize my dashboard with all the funky drag and drop boxes with the content I need!

  24. Posted 6/5/2007 at 8:09 am | Permalink

    Something I’d like to see is more plugins catered for in the default install.

    No, I wouldn’t like to see Wordpress bloated with extra code for these, which could reduce the platoform’s great flexibility.

    However, it could be nice to involve a couple more plugins ready for activation by default. Related and popular posts seems a favourite, along with some form of tag cloud - though it sounds like the latter may be coming with WP 2.3. :)

9 Trackbacks

  1. By Better Plugin Management : Losing it[1] on 4/20/2007 at 3:43 pm

    [...] all. And as this can be a bit tedious if you have a lot of them[2], Dougal Campbell has written a slight modification which will automagically reactivate the plugins for you. [...]

  2. [...] Campbell announced on his blog another feature that hopefully will be added in the Wordpress 2.2 release, which is the [...]

  3. [...] us of some excellent progress on this front over at his blog. Basically, with WP2.2 you will get a button to disable all plugins at once. Nice! No excuse from now [...]

  4. [...] slightly delayed. While WordPress 2.2 has been slightly delayed, there is still some exciting news. Dougal Campbell reports a new feature that allows one step click to deactivate all your WordPress Plugins, making it easier [...]

  5. [...] noticia ésta a la que accedo vía The Blog Herald: según anuncia Dougal Campbell, WordPress 2.2 incluirá un botón de activación/desactivación de plugins, una funcionalidad que [...]

  6. [...] Geek Ramblings: While testing some things on my development system, I was frustrated that after an upgrade, I [...]

  7. [...] at geek ramblings wrote about an upcoming change to WordPress 2.2. He’s written a lot about WordPress. Check it [...]

  8. By Wordpress 2.2 - A temblar » eduo.info on 5/16/2007 at 4:50 am

    [...] plug-ins (irónicamente, no existe un botón para “re-activar” los plugins, pero hay un parche para esto [...]

  9. [...] upon a time, I whipped up a Reactivate All Plugins feature for WordPress, to compliment the Deactivate All Plugins action (which is recommended before [...]

Post a Comment

Your email is never published nor shared.