It is analyzed that there are over 50000 WordPress plugins available on the market, a lot of users tend to try several plugins to compare a few different to accomplish tasks or solve problems on their site. When the problems are solved, they usually suppose that when they do not need those plugins any more, just uninstall it by deactivating and deleting. No, that’s not true. You delete but it might leave behind tables and rows in your database. It might be not significant but when you use more and more WordPress plugins for your site, how will it be? How about your disk space? In this article, I will show you how to uninstall WordPress pluigns in the most proper way. Let’s go!
Uninstall WordPress plugins in the Dashboard
Ok, before we talk about the most proper way, let’s take a look over the most common way people usually do: from Dashboard. There are two steps:
Step 1: In Plugins category, choose Installed plugins, click on Deactivate that is below the name of plugin
Step 2: Click on Delete
Uninstall WordPress plugins via FTP
Step 1: Connect to your WordPress site via SFTP.
Step 2: Browse to your /wp-content/plugins/ folder. Then delete the plugin folder from your server.
Note: Two methods above are not good, especially when those WordPress plugins will never be used again any more.
Issues when uninstalling WordPress plugins
The problem is that when you delete a plugin using one of the simple methods shown above, it typically leaves behind tables and rows in your database, like this:
Besides database, WordPress plugins also leave behind additional files and folders and this is commonly seen with security and caching plugins which create additional directories for logging. For example, when I uninstall a WordPress plugin, what are left will be:
The simple methods mentioned above are just the way to deactivate, not uninstall definitely. Remember to remove completely unnecessary WordPress plugins because if they still exist, they might hurt and be the burden for your site.
The most proper way to uninstall
Step 1: If you want to remove a plugin, the easiest way is asking Google. check the developer’s documentation on their site, or shoot them a quick email. There will be official docs on how to remove returned for you.
Step 2: A well-developed plugin should include an option in their plugin’s settings to do a complete uninstall. So, let’s see how we uninstall Gravity Forms plugin, for example. A quick click of the “Uninstall Gravity Forms” button and all the tables and data are gone.
Other WordPress plugins might require an even more complex uninstall process, such as WooCommerce, in which you have to put the following code in your wp-config.php file before deleting it to completely remove all the data.
define( ‘WC_REMOVE_ALL_DATA’, true);
Removing Unused Shortcodes
If you are using a plugin that utilizes shortcodes and you delete and or remove that plugin, your site could look really weird until you replace them. If you want to temporarily disable the shortcodes from the old plugin, simply use the following code in your functions.php file. Updating ‘pluginshortcode’ with the actual plugin’s tag.
add_shortcode( ‘pluginshortcode’, ‘__return_false’ );
This will disable them from showing altogether. However, if you want to use them with the original plugin again, you need to remove the code. That might be a quick way to clean up your site while replacing the shortcodes with perhaps a newer plugin’s shortcode format.