How To Uninstall A WordPress Plugin

How many plugins do you have installed on your website? While there’s no correct number, the general rule of thumb is fewer is better. This is especially true for outdated plugins that you’re no longer using, which can create potential vulnerabilities.

To ensure your website’s security, it is recommended to regularly remove unused plugins. Here’s how you can remove those plugins, as well as clearing up any leftover folders and files too.

Why you should uninstall WordPress plugins

There are several important reasons why you should remove obsolete WordPress plugins from your website:

It’s a nulled version: Sometimes you might inadvertently install plugins from unauthorized sources. These versions frequently contain malicious code designed to give hackers easy access to your website. Be sure to completely remove these versions, including any leftover plugin files, from your website.

You don’t need them anymore: Most of the time, you install a plugin and test it before deciding to use it. For plugins that aren’t suitable for your needs, you should remove them from your website immediately.

It is no longer supported: It’s highly recommended to get rid of plugins that are no longer maintained by their developers. You’ll never receive updates or support for these plugins, and they often contain vulnerabilities that malicious actors can exploit.

How to uninstall a WordPress plugin

Before we move on to the next section, let’s quickly differentiate between deactivating and uninstalling plugins.

Deactivating a plugin is like temporarily closing an app but still leaving it installed on your phone. You can reactivate it at any time with just one click, because it’s still installed on your website. Temporarily deactivating plugins is often used by developers to debug your website to check for possible conflicts.

On the other hand, uninstalling a plugin means that it is deactivated and completely removed from your WordPress website forever. All files and databases of the plugin are deleted and no longer displayed.

This is the better option if you want to ensure that hackers can’t access your websites via your outdated plugins, which is one of the most common security vulnerabilities in WordPress sites.

Uninstall WordPress plugins via the admin dashboard

Follow the steps below:

  1. Log in to your WordPress admin dashboard.
  2. Select Plugins > Installed plugins to see your plugin list.
  3. Scroll to the plugin you want to delete and click Deactivate.
PPWP Pro: Deactivate WordPress plugins
  1. Step 4: Then click on the Delete button in the plugin entry and then OK to confirm the deletion of the plugin.

Uninstalling a WordPress plugin via FTP

If you can’t access your website, you can also uninstall a plugin with FileZilla – just make sure you create a backup before you start the process.

  1. Install FileZilla and connect to your WordPress website.
PPWP Pro: Install FileZilla and connect to WordPress sites
  1. Navigate to public_html > wp_content > plugins to see a list of all installed plugins on your website.
PPWP Pro: How to uninstall a WordPress plugin via FTP
  1. Right-click on the plugin folder you want to uninstall and then click Delete. Finally, confirm that you want to delete the folder.

How to clean up leftover plugin files

Some plugins can leave files in the database even though you’ve removed the plugin itself. This is because sometimes plugins add folders to your website – you should therefore search the database of your WordPress website for entries that were added by the plugin and clean them up.

Note: Back up your website and database before making any changes.

There are two main ways to delete database entries:

  • Using the manual method with phpMyAdmin
  • With the help of a database optimizer such as WP-Optimize or Advanced Database Cleaner

Let’s go through the manual method with phpMyAdmin.

  1. Log in directly to phpMyAdmin, as most web hosts allow access to this tool by default.
PPWP Pro: How to remove leftover files via phpMyAdmin
  1. Find the plugin entries in the documentation or a table name with your own naming conventions. For example, the database entries of Contact Form 7 are called wp_contact_form_7.
  1. Filter the results and then delete all entries of the plugin you have selected.

Removing unused shortcodes

Another thing to consider is that many plugins use shortcodes to add details to your pages and posts. If these plugins are uninstalled, their shortcodes will remain on your website and will still show up on your website.

To remove unused shortcodes:

  1. Go to your dashboard and click Appearance > Theme Editor > functions.php.
  1. Paste the following code into your functions.php file:
add_shortcode(‘pluginshortcode’,’_return_false’);

All you need to do is replace “pluginshortcode” with the name of the shortcode.

Conclusion

In this article, we have gone through two different methods for uninstalling a WordPress plugin and its files. It is a good idea to clean up all remaining plugin files after removing a plugin. Doing this regular maintenance will improve website security – plus, having unnecessary plugins installed can increase your website’s loading times.