However, this does not remove all traces of a WP plugin and leaves behind rows and tables in your WP database. 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
Log into your WP dashboard and navigate to Installed Plugins. Click on Deactivate under the plugin.
Next click Delete.
Delete Plugin Via FTP
Plugins can also be uninstalled via FTP. Connect to an FTP client such as FileZilla, WinSCP, or Free FTP. Navigate to the /wp-content/ folder.
Find the plugin you want to remove and delete it from your server by removing its folder.
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.
Login via FTP and navigate to the plugins folder by the following path: public_html > wp-contents > plugins to see the folders for each plugin.
If you don’t recognize the name of the plugin in the directory, go back to your WP dashboard plugins tab to verify you are deleting the correct plugin.Right-click on the name of the plugin and click Delete.
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.
Start by installing and activating the plugin.Locate and open the WP-Optimize tab in your WP dashboard. Click on the Optimize database tables setting.
To run all optimizations at once, tick off the box to the left of Optimization to select all and then click the blue button Run all selected optimizations.Or, you can choose to run each one separately. Running all at once will take less time. When the process is done, you will see the message Optimization complete.
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.
To delete orphaned tables manually, use a tool such as phpMyAdmin. Most hosting control panels will give you access to this tool.From phpMyAdmin, use the search function at the top to find the database you want to clean up.
Search for names of entries that include the plugin’s name. For example, if you want to uninstall Yoast SEO, the plugin’s documentation tells you input wpseo into the search tab to find all entries related to the plugin.Choose all the tables that come up in the search and click Go.
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.
Install and activate the plugin. Look under the Tools tab for its settings. Choose the Search non-WP tables option and click Scan.The entries in red in the screenshot above belong to plugins that have deactivated or deleted. Check off these tables and delete them.
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 shortcodeadd_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.