If Plugin Deactivation Breaks Your Blog

June 1st, 2008

Ever deactivate a plugin, only to have it crash your blog? Typically, this will result in a “Fatal error: Call to undefined function.” which is then displayed on the front end of your site. According to John Lamansky, the reason this error occurs is because the theme is still calling on the plugin you deactivated.

John Lamansky has put together a list of steps that you should perform to alleviate this issue entitled, What To Do If Plugin Deactivation Breaks Your Blog. Typically, deleting the plugin file from your plugin directory usually solves most problems. However, John’s list of steps guides you through the process of determining which bits of code from the failed plugin are causing the errors and then removing those lines of code.

If you have ever gone through the experience described above, please let us know how you went about fixing the issue.




  1. Tom (1 comments.) says:

    i’ve experienced this pretty often, but not when deactivating a plugin, but rather when implementing a theme that is depending on certain plugins. This already gave me the suggestion that the error was related to plugin. The post does not really apply to me, but still interresting to discuss.

  2. Kevin Paquet (8 comments.) says:

    For me, just deleting a plugin worked out 100% right now. Haven’t experienced such kinds of errors that often.
    What really was something of my concern was the Maintenance Mode Plugin that was active and my site in maintenance that time. And I was upgrading to 2.5 that time. I wasn’t able to get into my blog until I figured out that deleting/renaming the plugin folder would help

  3. Ronald Huereca (66 comments.) says:

    A lot of plugin authors are to blame as well, because when showing how to use the plugin in a template, the usually don’t supply the ‘function_exists’ code, which will solve almost all deactivation issues.

  4. Aaron (33 comments.) says:

    Function_exists() are messy. More theme authors need to add do_actions as these are automatically tested for existence before they are called.

    They also fit better into WP themes.

  5. Ronald Huereca (66 comments.) says:

    Yes, that’s a good point. If authors added the appropriate actions and filters, all that would be required is a bunch of do_actions and apply_filters, and it wouldn’t break themes if the plugin was gone.

  6. Teli (24 comments.) says:

    As a theme creator, if I code a theme to be dependent on a plugin (rarely), or even when making concession for people who may be running an older version of WP which doesn’t have all the fancy new functions, I always make sure to include a default if function exists check first.

    It’s just a good habit to get into when producing themes for public consumption.

  7. Claudia J. (2 comments.) says:

    I may be the only one, but deleting the plugin never actually worked for me whenever turning it off broke my theme. I always had to go and delete the code from the theme like the linked to article says. Weird.

  8. Stephen R (24 comments.) says:

    Kevin or Ronald —

    Might either of you be so kind as to bang out a post giving an example of what you’re referring to with “do_action”? If it’s a good idea, it’s an idea worth sharing. :)

  9. Stephen R (24 comments.) says:

    Sorry… meant to say “Ronald or Aaron” in that comment.

  10. Ronald Huereca (66 comments.) says:

    I have a post going live in a few hours that should hopefully answer your questions.


  1. […] If Plugin Deactivation Breaks Your Blog (tags: blogs.coding) […]

  2. […] logged into my dashboard and saw a post in the WP feed about what to do if your blog goes down upon deactivating a plugin. I’ve had this happen to […]

  3. […] subscribe to our feed! You can also receive updates from this blog via email.When Jeff wrote about plugin deactivation breaking your blog, Aaron and I wrote in the comments of a few solutions to prevent plugin issues with […]

  4. […] If Plugin Deactivation Breaks Your Blog According to John Lamansky, the reason this error occurs is because the theme is still calling on the plugin you deactivated. […]

Obviously Powered by WordPress. © 2003-2013

page counter