What to Do If Plugin Deactivation Breaks Your Blog

Say you just disabled a plugin, and now your WordPress blog’s front-end says “Fatal error: Call to undefined function.” Part of your site may even be missing.

The problem is that your theme is calling on the plugin you deactivated. However, since that plugin is gone, the site displays an error and then stops rendering the rest of the page.

Here’s what to do:

  1. Go to your WordPress administration. Click “Design” (or “Presentation”), then click “Theme Editor”.

  2. Where on your site did the error appear? If it was on your sidebar, click “Sidebar.” If it was only on a search page, click “Search Template.” If it was in the comments section, click “Comments,” etc.

  3. Now look for a function call that might be related to the plugin you just deactivated. For example, if you deactivated the Related Posts plugin, you might see some code like this:
    <?php related_posts(); ?>

  4. If you don’t plan on using the plugin again, and if you’re sure the code belongs to the deactivated plugin, just delete the code.

    Or instead, you can follow these instructions to alter the plugin function call so that it won’t break your blog when the plugin is deactivated.

    (If you’re new to theme editing, you might want to backup your theme first just in case.)

  5. When you’re done, click the “Save” button to save your changes.

  6. If you couldn’t find any relevant code, or if the problem still isn’t fixed, repeat steps 3-5 for the rest of your theme files.

If all else fails, reactivate the plugin to get rid of the error, and then consult the plugin’s documentation, contact the plugin author, or file a support request at the WordPress Support Forums.

21 Comments

  1. Pingback: If deactivating a plugin breaks your blog — WP Project

  2. Pingback: How to Uninstall a Plugin

  3. Pingback: Weblog Tools Collection » Blog Archive » If Plugin Deactivation Breaks Your Blog

  4. Pingback: Wp Wordpress » Blog Archive » If Plugin Deactivation Breaks Your Blog

  5. Pingback: If Plugin Deactivation Breaks Your Blog | BlogBroker24-7

  6. And after you fix your site the absolute next thing you need to do is contact the Plugin author and scream at them for not putting in the proper code to prevent these types of issues.

  7. Pingback: Wp Wordpress » Blog Archive » Weblog Tools Collection: If Plugin Deactivation Breaks Your Blog

  8. African safari

    I had a similar problem on my African safari holidays blog when i tried upgrading to a new version of cform plugin. The automatic upgrade function wasn’t able to upgrade and it also affected how i post articles. Later on i deleted all the files using ftp and after deactivating and reactivating the plugins everything was fine.

  9. I always use the function_exists when adding plugin code to the template.

  10. Pingback: SURFTIN - What to Do If Plugin Deactivation Breaks Your Blog

  11. Pingback: When A Deactivated Plugin Breaks Your Blog

  12. Pingback: blog.rotracker.net » Blog Archive » If Plugin Deactivation Breaks Your Blog

  13. Pingback: Bitwire.TV | WordCast 16: Serenade the Developers

  14. Pingback: Jeffro On WordCast | Jeffro2pt0

  15. Pingback: Une semaine avec Wordpress #15

  16. Pingback: WordCast 16: Serenade the Developers | Kym Huynh

  17. Pingback: Lighten The Load Of Your WordPress Blog - Part One | Philaahzophy

  18. Pingback: 100+ Killer Wordpress Resources | Steffan Antonas' Blog

  19. Pingback: WordCast 16: Serenade the Developers | WordCast

  20. Bear

    thanks, this article really helped me out!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>