How to safely uninstall a WordPress Plugin?

Have you ever encountered “Fatal error: Call to undefined function”, when you disabled a plugin? This error is displayed on your blog’s front-end, because the function in your theme is still calling on the plugin you deactivated. However, since that plugin is deleted /deactivated, the site displays an error and stops rendering the rest of the page. […]

Have you ever encountered “Fatal error: Call to undefined function”, when you disabled a plugin? This error is displayed on your blog’s front-end, because the function in your theme is still calling on the plugin you deactivated. However, since that plugin is deleted /deactivated, the site displays an error and stops rendering the rest of the page.

Here’s how to safely remove plugin, we’ll work with excerpt reloaded plugin:

  1. Before you deactivate plugin, first go to WordPress admin panel, and click “Design or Presentation”, then click “Theme Editor”.
  2. Now, open your theme template file, that call the function related to the plugin, that you’re going to deactivate. In our example, we’ll open post.php, as the function resides in this file.
  3. Now look for a function call that’s related to the plugin, in our example:
    <?php the_excerpt_reloaded(); ?>
    1. If you don’t plan on using the plugin in future, just delete the code.
    2. Incase if you’re not sure of future useage, you can either comment it out as under:

      <!--?php the_excerpt_reloaded(); ?-->
    3. or you can call it as follows, that’ll avoid breaking your blog with above noted error:

      <?php if(function_exists('the_excerpt_reloaded')) { the_excerpt_reploaded(); } ?>
  4. When you’re done, click the “Save” button to save your changes.