With over 50,000 plugins in the repository, it is clear that WordPress plugins are an essential element for any WordPress site. You have probably tested many of them and tried to use them to solve problems or perform tasks. If you decide you don’t want to use it anymore or if it doesn’t work as you expected, deactivate it and delete it from your WP dashboard.
However, this does not remove all traces of a WP plugin and leaves rows and tables in your WP database.
The plugins most likely to store data are forms, caching, security, and SEO plugins. Before proceeding, backup your website in case something goes wrong.
Over time, these traces of plugins take up disk space and affect the performance of your site. This article will show you how to remove a WP plugin along with all its files.
Remove WordPress plugin from dashboard
- Log in to your WP dashboard and navigate to Installed Plugins†
- click on Deactivate under the plugin.
Remove plugin via FTP
- Plugins can also be removed 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 remove it from your server by deleting the folder.
Using FTP to delete leftover files
WP stores related plugin files in unique folders. You can delete these files using an FTP client such as: FileZilla†
- Log in via FTP and navigate to the plugins folder using the following path: public_html † wp-content † plugins to see the folders for each plugin.
- If you don’t recognize the plugin name in the directory, go back to your WP dashboard plugins tab to make sure you’re removing the correct plugin.
- Right click on the plugin name and click remove†
Remove orphaned tables from your database
Many WP plugins create their own tables and add this information to your database. Some or all of these tables are often left behind when you remove a plugin and are called orphaned.
There are two methods to delete these tables. The easiest is to use a plugin.
WP-Optimize will purge unused data and remove it from your database.
- Start by installing and activating the plugin.
- Find and open the WP-Optimize tab in your WP dashboard.
- Click on the Optimize database tables institution.
- To run all optimizations at once, check the box to the left of . at Optimization to select all and then click the blue button Perform all selected optimizations†
- Or you can choose to run each individually. Running in one go takes less time. When the process is completed, you will see the message Optimization complete†
Delete orphaned tables manually
Do not attempt this method unless you are experienced and comfortable with database editing. You don’t want to delete tables that are not related to the plugin you are removing.
- To delete floating tables manually, use a tool like: 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.
- Look for item names that contain the plugin name. For example, if you want to remove Yoast SEO, plugin documentation tells you input wpseo in the search tab to find all the items related to the plugin.
- Choose all tables that come up in the search and click on To go†
Use WP plugins to remove plugin related files
Some free and premium WP plugins will clean up your database with minimal effort. Below are a few.
Plugins Garbage Collector
Plugins Garbage Collector scans and checks your WP database to display the tables you can’t see in your WP dashboard.
- Install and activate the plugin.
- Look under the Tools settings tab.
- Choose the Find non-WP tables option and click Scan†
- The red entries in the screenshot above belong to plugins that have been deactivated or removed. Check off and delete these tables.
WP-Optimize has over 600,000 active installs and is one of the most popular plugins for WP database optimization.
Click Run Optimization to clean up the options you want. See the tables and their sizes on the Table Information tab. You can also schedule the optimizations in the Settings tab.
WP-Sweep is another WP plugin that cleans up unnecessary data in your database, including orphaned plugin data and tables.
After installing and activating the plugin, go to the settings by going to Tools † Sweep† The plugin interface shows unnecessary data in your database.
There are sections for comments, users, conditions, messages, options, and optimization tables. To optimize your database, click Sweep next to the entrance.
WP-Sweep uses WP delete functions to clean up your database. This ensures that orphaned data is not 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 is preserved and it is displayed to viewers as text in brackets.
One option is to manually remove the shortcut from every instance on your site. However, this can take a long time. Other, more time-saving and practical options are described below.
Hide the shortcode
To hide a leftover shortcode from a removed plugin, add the following to your Functions.php file:
// remove shortcode
add_shortcode( ‘name_of_shortcode’, ‘__return_false’);
Use WP Plugin Remove Orphaned Shortcodes
If you are not comfortable with editing WP files, use the Remove orphaned shortcodes plug in.
This plugin automatically hides orphaned (inactive) shortcodes from your content that were previously used with plugins and themes.
Removing plugins from your WP dashboard is simple and easy. However, as you now know, deactivating and removing plugins does not always remove all associated files and WordPress databases.
The next time you want to remove a WP plugin, follow the steps above to rid your database of junk files and keep a fast and clean WP site.