Uninstalling WordPress plugins: Probably the simplest thing in the world, right? Just click a few buttons and the problem plugin is gone. In an ideal world that would be the case. But the default uninstaller can actually leave a lot of garbage data behind on your site.
This ranges from useless tables left in your database to a bunch of little files taking up space in the background. While this usually isn’t a big deal, these leftover files can sometimes cause conflicts or other errors.
So what’s the right way to get rid of plugins then? How can you make sure you’ve scrubbed every last piece of data from your website? That’s what you’ll learn in this guide on how to fully uninstall WordPress plugins.
Reasons to Uninstall WordPress Plugins
Why get rid of a plugin in the first place? There are many reasons:
- Doesn’t suit your needs — Sometimes you download a plugin and test it out, only to realize that it’s really not for you. Maybe it doesn’t have the feature you really wanted, or it just doesn’t work as well as advertised. It happens! But all the more reason you’ll want to make sure you get rid of all traces of it.
- You grew out of it — Perhaps you’ve found a better replacement, or maybe its functionality just isn’t useful to you at all anymore. Not all plugins last forever. When you no longer need them, it’s time to uninstall.
- It’s broken — WordPress plugins are made by a community of small developers. While this means there’s plenty of variety, it also means developer skill levels vary widely from one plugin to the next. There’s also no thorough vetting by the official WordPress team. Mistakes, conflicts, poor coding, or broken sites — it can all happen. And it does, it’s even more likely you can’t uninstall the plugin properly, leaving garbage data all over your site.
- It’s malicious — While it’s very rare to get a plugin containing malware from the official repository, third-party themes and plugins can sometimes contain viruses. Nulled plugins in particular run a higher risk of malware infection. When this happens, simply clicking Uninstall is not likely to do the trick. (On that note, if you’re sure your site is infected, even manual removal isn’t likely to get rid of it. Unless you know what you’re doing, it might be time to call in the pros.)
Why Developers Leave Extra Files
If you download even just a handful of WordPress plugins, you’re likely to find a few that leave behind files. Why do developers do this? Is it intentional?
There are quite a few reasons your WordPress plugins may not fully uninstall. The blame may lie on WordPress itself; its uninstaller doesn’t always remove all the files it’s supposed to. It may also be an accident on the part of the developers. For example, they add files in the wrong locations or mark them incorrectly. As a consequence, they aren’t properly removed when uninstalled.
Sometimes files also remain on purpose. The reason is usually to preserve your user settings if you ever choose to install the plugin again, similar to a browser cookie. Of course, if you never plan on reinstalling this plugin, it’s only taking up dead space on your site.
A malicious plugin may intentionally hide files in places where they won’t be removed, or even add lines of code to existing core files to make sure your site stays infected. Getting rid of such malware will not be a simple task of deleting a few database entries, so make sure to use a malware removal tool.
In most cases, a few files left behind on your website isn’t a huge cause for alarm. They’re usually so tiny that deleting them frees up little to no space. They’re also very unlikely to cause any conflict or damage.
But when you’ve uninstalled dozens of plugins over several years, you can end up with a concerning amount of useless data left behind on your site. When it’s time for a spring cleaning, you have to get in there and get rid of all those leftover files.
Deactivating vs. Uninstalling Plugins
When you want to turn off a plugin, you have two options: deactivating them, or outright uninstalling them. Which is better, and what exactly is the difference?
Uninstalling a plugin at least aims to fully delete it and make it as if it was never present on your site. While it doesn’t always work, WordPress tries to get rid of all the files and database entries the plugin created, then removes it from your plugin list.
Deactivated plugins are a little different. Any files they’ve created remain on your website. However, WordPress stores them in such a way that they don’t activate and won’t slow down your website. They remain in your plugin list, ready to reactivate at the click of a button.
So which is the better solution? Well, if you’re here to get rid of database and file bloat, then you want to uninstall unused WordPress plugins and this guide will help you make sure you clean up any leftovers.
Deactivating a plugin is only useful when you’re temporarily not using it and you want to preserve your settings. It’s good for when you suspect a plugin is causing a problem but don’t want to outright delete it and lose everything.
Yet, deactivated plugins left to sit still contribute to inflating your database. Plus, they can serve as points of entry for security breaches. So, unless you just want to temporarily turn them off, it’s better to uninstall plugins you no longer need.
How to Uninstall a WordPress Plugin: 3 Methods
If you want to get rid of a problem plugin, there are three ways to do it: with the default uninstaller, by deleting it manually over FTP, or by using the plugin’s built-in uninstallation tool.
Whatever you pick, there’s still a chance of files unintentionally staying behind. Let’s quickly get rid of the core plugin files first and then we’ll move on to removing those extra stray files.
Whatever way you choose, you should always take the time to read through the plugin’s website or documentation. There may be special instructions to ensure no files remain without you having to manually dig through your server.
Uninstalling Plugins the Easy Way
The simplest way to uninstall plugins requires no complicated finagling or delving into sensitive files. The solution is right there in your dashboard, and while it doesn’t always work perfectly, it’s the easiest way to get rid of the majority of a plugin’s files.
Log into your WordPress back end and navigate to Plugins > Installed Plugins on your dashboard. Here you’ll see a list of all extensions currently on your site.
Scroll until you find the plugin you want to delete, then click Deactivate. It is now turned off and will no longer affect your site. But as we mentioned before, you should get rid of plugins no longer need unless you specifically plan to use them again later.
Once inactive, you should now see a Delete button in place of the Deactivate button in the plugin entry. Click it, and most of its files should be gone just like that.
Unfortunately, this method tends to leave stray bits of data behind, intentionally or otherwise on the part of the developer. You’ll need to clean up anything that the uninstaller didn’t catch.
Uninstalling Plugins with FTP
If you have a particularly difficult plugin, especially if it’s locking you out of your back end, your best option is to delete its files with FTP.
Just a note: While it won’t cause problems in most cases, you should not delete some complex plugins this way. It usually will not cause issues to simply delete the plugin folder, but this is considered a last resort that can leave even more garbage data sitting around your site. In most cases, you should use the built-in uninstaller first.
That said, some WordPress plugins may refuse to uninstall the traditional way, so you’ll have no choice but to delete it with FTP.
The first step is to install an FTP program like FileZilla, or see if your hosting provider has their own built-in FTP access tool. You’ll also need your FTP credentials (username, password, port, etc.).
Once you’ve connected, click to the public_html folder, then to wp-content. Finally, click the plugins folder.
Now find the offending plugin in the list, right click it, and delete it. With that the plugin should finally be inactive.
But while the main functionality has been disabled, there may be additional folders and database entries that you’ll need to hunt down manually. Your
.htaccess files may have seen changes as well. That’s why it’s better to run the uninstallation tool rather than try to delete a plugin yourself.
Use a Custom Uninstaller
While not every plugin has one of these, sometimes large or complex plugins will include their own special uninstallation tool and options.
These tools tend to do a much better job fully removing plugin files than the default process. They’re also often much more customizable, allowing you to choose what type of files if any should stay behind.
That’s why it’s always a good idea to skim through a plugin’s documentation before you remove it. You could save yourself a lot of time manually removing files.
While the location of the custom uninstallation tool varies by plugin, you can usually find them in the plugin settings in your back end.
How to Clean Up Leftover Plugin Files
If you’ve opted to stick with WordPress’ traditional uninstaller, you’ll need to access your site through FTP to make sure nothing unwanted has stuck around.
As before, obtain your FTP credentials from your web host and use it or an FTP tool like FileZilla to log in. Navigate to /public_html/wp-content/plugins/ and look for the plugin’s folder. Delete it and any remaining files in there with it.
Some plugins may add multiple folders, not always clearly named. Be careful when deleting anything you’re not sure of, and make sure you back up your site first.
While here, you should also take a look through your
wp-config.php files (located in the root folders) and look for any entries obviously added by that plugin. Be careful when editing these files and only delete entries you’re sure come from a plugin.
Deleting Database Entries
Plugins rely on the database to function properly, but it’s common for tables they add to not get deleted completely. You’ll need to either get rid of them yourself or use a plugin to do so. In either case, messing with the database is very sensitive and it’s easy to make a mistake, so backup your website and database before you touch anything!
If you want to try the manual approach, you’ll need phpMyAdmin installed. Luckily, a majority of web hosts give you access to this tool by default.
Once logged into phpMyAdmin, you’ll need to figure out which entries come from a plugin. You may be able to find this in the documentation, or it may be obvious by the table name. For instance, the name of Contact Form 7’s database entries is
wp_contact_form_7. Other plugins create tables with their own naming conventions.
Once you know the database names, filter the results by this name, then delete all the entries. Double check to only delete those with the correct names.
If you’re not comfortable doing this manually, you could try a database optimizer. WP-Optimize or Advanced Database Cleaner — either one will do the trick.
Removing Unused Shortcodes
Sometimes plugins will properly remove shortcodes from your existing posts. Other times, you’ll have dozens of pages filled with distracting plain text shortcodes in the middle of everything. Some page builder plugins used to be notorious for that.
You can and probably should remove these manually. But until you get to them, you can hide these shortcodes with a simple function.
functions.php file either through FTP or through Appearance > Editor in your dashboard. Add this function for each broken shortcode and you’re good to go:
add_shortcode( 'exampleshortcode', '__return_false' );
You could also try the plugin Remove Orphan Shortcodes, which will automatically hide all these shortcodes. It does not delete them however; you’ll still need to manually remove them.
Fully Uninstall Plugins in WordPress
Sometimes plugins fail to fully delete themselves, and all that garbage data can quickly pile up. But by scrubbing the extra files with FTP, cleaning up the database, and hiding those ugly broken shortcodes, you can finally remove all traces of a stubborn plugin.
After going through this guide, how much data did you clean up? Any other tips to completely uninstall WordPress plugins? Let us know in the comments!
Start the conversation