How to Switch Off All WordPress Plugins

I just picked up a very useful tip on Dougal Campbells blog that I thought I should note down for posterity, especially with so many people planning to upgrade to WordPress 2.1 in the near future.

I disabled all the plugins by renaming the plugin directory temporarily and reloading the page (WP will automatically disable any plugins that it can’t load up, in case you weren’t aware of that trick).

Yes it is obvious when you think about it, but so many tips and tricks are the same.

However this is something you should think about testing before you attempt an upgrade to WordPress 2.1 because many plugins have very poor instructions for adding code, that could end up breaking your blog if used, and for some reason you switch off the plugin in question.

For any plugin that you manually have to add code to your theme in order for it to display, you should always use some form of logic to test whether it exists.

One of the best sources for how to do this as a plugin writer is Headzoo’s tips and tricks .

however for a WordPress user presented with a plugin they are given installation instructions for, this is what you need to do.

As an example the code to include for a Bumpzee widget (picking on someone I know and who will probably fix this within 60 minutes as he never seems to sleep)

<?php bump_this_widget(); ?>

This should be changed to

<?php if (function_exists('bump_this_widget')) bump_this_widget(); ?>

If you go through your modified themes before you upgrade to WordPress 2.1 and ensure that all function calls you make include some logic, then any problem solving afterwords will be much more straight-forward, and won’t take down your site just because you switch a plugin off.

Share
This entry was posted in plugins , wordpress and tagged , , , . Bookmark the permalink . Both comments and trackbacks are currently closed.

2 Comments

  1. Scott Jangro (1 comments.)
    Posted February 6, 2007 at 3:36 am | Permalink

    Thanks for picking on me Andy. ;)

    Tested on my own blog and instructions are updated.

  2. Donetsk (2 comments.)
    Posted September 27, 2007 at 5:04 am | Permalink

    This is great Andy. I sometimes start a new blog but want to use plugins from the other blog, this will save time. Cheers!
    Regards, Don.

2 Trackbacks

  1. By WordPress Wednesday: Custom Fields Contest and Lots of WordPress.com News at The Blog Herald on February 7, 2007 at 7:41 am

    [...] a long time, I’d forgotten to mention it during all of the WordPress 2.1 upgrade information. Andy Beard reminded me that is it easy to turn off all your WordPress Plugins by temporarily renaming the [...]

  2. By Como desactivar todos los plugins de WordPress al mismo tiempo =A= Aeromental on March 4, 2007 at 2:47 pm

    [...] pero funcional de deshabilitar todos los plugins de WordPress con un solo movimiento de mouse. Andy Beard lo hizo gracias a un tip de Dougal Campbells. El truco es este: Cambiar de nombre a la carpeta de [...]



  • uQast Charter Member Launch

    uqast
    Affordable Subscription available

    50% OFF Limited Time

    Contact me if you have any questions at all about uQast - I am the Product Manager and have been working on the platform for the last 15 months.