How to Remove all Traces of a WordPress Plugin

by David Trounce

With over 50,000 plugins in its repository, it’s clear that WordPress plugins are an essential element to any WordPress site. You have most likely tested and tried to use many of them to solve problems or accomplish tasks. If you decide you don’t want to use it anymore or it doesn’t work as you expected, you deactivate and then delete it from your WP dashboard.

However, this does not remove all traces of a WP plugin and leaves behind rows and tables in your WP database.

Table of Contents

    The plugins that are most likely to store data include form, caching, security, and SEO plugins. Before proceeding, be sure to backup your website in case something goes wrong.

    Over time, these plugins traces will take up disk space and affect your site’s performance. This article will show you how to remove a WP plugin along with all associated files.

    Remove the WordPress Plugin From The Dashboard

    Delete Plugin Via FTP

    Use FTP to Remove Leftover Files

    WP keeps related plugin files in unique folders. You can remove these files with an FTP client such as FileZilla.

    Remove Orphaned Tables from Your Database

    Many WP plugins create their own tables and add this information to your database. Some or all these tables are often left behind when you uninstall a plugin and are referred to as orphaned.

    There are two methods to remove these tables. The easiest is to use a plugin.

    Use WP-Optimize

    WP-Optimize will clean up and remove unused data from your database. 

    Delete Orphaned Tables Manually

    Don’t attempt this method unless you are experienced and comfortable editing databases. You don’t want to delete tables that are not related to the plugin you are uninstalling.

    Use WP Plugins to Remove Plugin Associated Files

    Some free and premium WP plugins will clean up your database with minimal effort.  Below are a few of them.

    Plugins Garbage Collector

    Plugins Garbage Collector will scan and check your WP database to show the tables you can’t see in your WP dashboard.

    WP-Optimize

    WP-Optimize has over 600,000 active installations and is one of the most popular of the WP database optimization plugins.

    Click Run optimization to clean up the options you want. See the tables and their size in the Table information tab. You can also schedule the optimizations under the Settings tab.

    WP-Sweep

    WP-Sweep is another WP plugin that will clean up unnecessary data in your database, including orphaned plugin data and tables.

    After you install and activate the plugin, access the settings by going to Tools > Sweep. The plugin interface shows unnecessary data in your database.

    There are sections for comments, users, terms, posts, options, and optimizing tables. To optimize your database, click Sweep next to the entry.

    WP-Sweep uses WP delete functions to clean up your database. This ensures that orphaned data isn’t left behind.

    Remove Unused Shortcodes

    WP has many plugins that use shortcodes that you insert on pages and posts. When you deactivate the plugin, the shortcode remains and shows as text in brackets to viewers.

    One option is to remove the shortcut from every instance on your site manually. However, this can take a long time. Other more time-effective and practical options are outlined below.

    Hide the Shortcode

    To hide a shortcode leftover from a deleted plugin, add the following to your functions.php file:

    // Remove shortcode
    add_shortcode( ‘name_of_shortcode’, ‘__return_false’ );

    Use WP Plugin Remove Orphan Shortcodes

    If you aren’t comfortable editing WP files, use the Remove Orphan Shortcodes plugin.

    This plugin automatically hides orphan (inactive) shortcodes from your content that were previously used with plugins and themes.

    Uninstalling plugins from your WP dashboard is simple and easy. However, as you now know, deactivating and deleting plugins doesn’t always remove all files and WordPress databases associated with them.

    Next time you want to delete a WP plugin, follow the steps above to rid your database of the unwanted files and maintain a fast and clean WP site.

    Exit mobile version