WordPress plugin management plays a huge role in the administration of a WordPress website. With thousands of different plugins available to website owners, it can be challenging to determine which one you need unless you give it a test drive.
When you no longer need a particular plugin or would like to replace it with another one, you need to remove it from our WordPress website. Plugin deactivation and removal steps are part of the overall WordPress plugin management scheme, and the importance of these processes is hard to underestimate.
Cleaning up, removing, and managing WordPress plugins
In this article, we will learn how to manage WordPress plugins, including how to remove the unused ones properly to ensure our website is not overloaded with any residual data.
Overview of WordPress plugin administration
WordPress plugin administration is of vital importance when it comes to your website performance and security. Every plugin is essentially a piece of software that gets built into your WordPress website to extend its functionality.
Once a plugin is installed, its files will be saved to the Plugins folder in the WordPress content directory, but it does not end there. The WordPress database stores a considerable amount of information that WordPress relies on to function correctly, including the plugins that need to be loaded and their settings.
Plugin developers have ensured that you do not need to perform any operations manually to ensure a newly added plugin is installed and activated. Getting a new plugin installed is easy and straightforward — you can add it from your WordPress dashboard and activate it in a few clicks. WordPress does all the work getting the newly installed plugin integrated into the website behind the scenes, so a website owner can get to its configuration and take advantage of the plugin features immediately.
You activate a new plugin, configure it to best suit your needs, and in most cases, if everything works great, you get to leverage the unique features the plugin offers going forward.
Unfortunately, it is not that easy in the WordPress world. We can run into issues with WordPress plugin functionality, compatibility, or just want to move on to using a different plugin that is more convenient and provides a better user experience. That is where we need to know how to deactivate correctly and remove a plugin we no longer need.
Manage Wordpress plugins — why you need to remove unused plugins
Your WordPress database contains all information your website relies on, including some vital information about the installed plugins. Along with the tables WordPress creates for plugin administration purposes, plugins can add their own tables. For example, it can be a table containing failed authentication attempts made by a WordPress security plugin. You can imagine that every new plugin installed means even more data saved both to the database and the WordPress installation files.
Keeping your WordPress fast and secure means you take a mindful approach to WordPress plugin administration. It heavily relies on keeping it simple — only the software you absolutely need should always be active. It is not easy to answer the question of how many plugins a WordPress website should have installed. Still, the general rule is to conduct regular audits, ensuring there are no unnecessary addons installed, including plugins and themes.
A WordPress database free of unneeded data means less information loaded to present the website to the visitor, resulting in better load times. Leaving unused plugins on the website means their data is still present in the database and recognized by WordPress, which also presents increased security risks. If a plugin is not in use, but not removed, you probably do not keep it updated, giving hackers a great opportunity to exploit known vulnerabilities and take over the website.
Manage WordPress plugins — deactivate vs. uninstall
Deactivating and uninstalling WordPress plugins often can seem the same to website owners when in reality, these two options serve different purposes. Let’s take a look at the three key differences between them.
|Criteria||Plugin Deactivation||Plugin Removal|
|Done when you need to disable a plugin temporarily||Yes||No|
|Removes all plugin data from the website||No||Yes|
|You can easily reactivate a plugin without its reinstallation||Yes||No|
As you can see, when a WordPress plugin is just deactivated, its data is still entirely stored within the website’s files and the WordPress database, so you can easily re-enable the plugin and continue using it. No configuration changes you made will be lost. In addition, deactivating a plugin allows you to temporarily disable it, for example, when tracking down what plugin might be causing issues with the website.
Removing a plugin, on the other hand, means all plugin data is fully deleted from the website. As a result, you cannot easily re-enable the plugin without having to install, activate, and configure it again.
Removing WordPress plugins
Removing WordPress plugins seems like an easy process, but it has nuances that make it much more complicated than we can imagine. WordPress presents an official interface to manage WordPress plugins from your admin dashboard. Most of the time clicking Delete under a plugin you deactivated before this will permanently remove it from your website.
But there are cases where you would need to take it into your own hands and perform additional cleanup to ensure there is no residual data left behind from the WordPress plugin you thought you removed.
Unfortunately, with a wide variety of plugins available, not all of them are properly coded to automatically remove all plugin information and settings. However, the vast majority of popular plugins developed by well-known and trusted software companies ensure the removal process is fully automated and does not require your direct intervention. Moreover, plugins from verified sources can present a built-in uninstallation menu, which is a great thing.
But you may still run into situations where once you remove a plugin from the WordPress plugin admin interface, its data is still present in the database and WordPress files. That can have benefits, for example, if you would like to reinstall a plugin later and not lose its configuration. But generally, you would want to have all WordPress plugin data removed entirely once you delete the corresponding plugin.
Let’s dive into the three-step WordPress plugin removal process.
Step #1: Check if the plugin has an uninstallation menu
As we discussed, some plugins include an uninstallation interface that allows you to remove the plugin and all its data without having to do any additional cleanup manually. For example, the well-known Wordfence security plugin comes with an additional feature called Wordfence Assistant. This plugin was developed to help users with some Wordfence data management tasks, including the full removal of the WordFence plugin data:
Step #2: Delete a plugin from the WordPress plugin admin interface
If the plugin you would like to remove does not have an uninstallation menu or you would like to remove it manually, it can be done from the WordPress plugins admin interface that was created to manage WordPress plugins.
First, navigate to the plugins list from your WordPress Admin Dashboard. Then, deactivate the plugin you would like to remove if it is active:
If the plugin you need to remove permanently is already deactivated, navigate to the Invective plugins tab and click Delete under the chosen plugin name. Confirm that you would like to delete the plugin, which will be removed from the menu:
Step #3: Perform the cleanup
After we have deactivated and deleted the plugin from the WordPress dashboard, it's likely that no more plugin data remains in the database or any WordPress files. Still, if there is any, we need to know how to remove it manually.
Three types of data that can be left by a removed plugin that we need to look for:
- Files outside of the Plugins directory.
- Data in the WordPress database.
- Unused shortcodes.
Removing plugin files outside of the Plugins directory
Any extra files added by the plugin outside of the Plugins directory can be found in the wp-content folder. For example, unless uninstalled using the Wordfence Assistant plugin, Wordfence leaves behind the wflogs folder. We can remove it manually using SFTP, File Manager, or the command line interface:
Removing a plugin's database tables
Generally, once a plugin is removed, its data can no longer be found in any tables the WordPress database has by default. But along with additional files, WordPress plugins can create new tables that can still be there for us to remove manually.
Please note that you need to make a backup of your WordPress database before making any changes to it! This step cannot be skipped under any circumstances.
There are certain ways we can do this, and yes, there is even a separate plugin we can use for this purpose. One of them is the Advanced Database Cleaner plugin. Unfortunately, a Pro version is required to get access to the removal of orphaned tables:
As we are working with a database, any database administration utility can be used to help you remove the tables a plugin left behind after its removal. If you are comfortable enough with the command line, you can do it from the terminal. Otherwise, we recommend using the phpMyAdmin database utility.
Choose your database from the phpMyAdmin interface and click Search from the top menu:
We can search the WordPress database for any data associated with a specific plugin. For example, we have just removed the Wordfence plugin manually, so in the screenshot below we have selected all tables to scan for any entries containing “wf” created by the Wordfence plugin. If you are unsure what you need to search for, please check the plugin’s documentation:
Click on Go, and you will be presented with the list of matches. As shown below, we have quite a few tables left from the Wordfence plugin after removing it from the WordPress Admin Panel. Most of them are empty, but the wp_wfconfig table still contains the plugin configuration:
Click on each table associated with the WordPress plugin you removed and click Delete to remove all empty tables or any rows in the default WordPress tables, like wp_options containing the plugin information. Confirm the removal, and you should see a message letting you know the query ran successfully.
Removing unused shortcodes
Some WordPress plugins utilize shortcodes to customize your website pages and posts. If you remove one of these plugins, it will ruin the structure of the posts. To avoid that outcome, we need to remove all unused shortcodes.
Add the following code to your WordPress website’s functions.php file to temporarily disable the shortcodes left from the plugin you deleted. Make sure you update the pluginshortcode with the actual shortcode tag the plugin added:
add_shortcode( 'pluginshortcode', '__return_false' );
Please note that you will need to remove this code if you decide to reinstall the plugin you removed that originally added the shortcode.
WordPress hosting at Nexcess
Knowing how to manage WordPress plugins is one of the most important aspects of a WordPress website administration. WordPress plugin removal can be considered a very challenging part of the process as sometimes it takes additional steps to properly remove a plugin and all its data from the website.
While most plugins have uninstallation guides that provide all information on making sure no extra data is left behind in the database and WordPress files after the plugin removal, the steps outlined in this article apply to any plugin.
Managed WordPress hosting plans
Free instant access to staging, SSLs, daily backups, unlimited email, premium plugins, a curated WordPress stack, and more.
Nexcess Knowledge Base has gathered a lot of helpful information on how to manage your WordPress website by applying the best practices. We keep working on making managed hosting the best experience for you.
We know how much time and effort it takes to create something spectacular, and we are here to help you turn it into a successful online project. Our Managed WordPress Hosting plans are prepackaged with the best solutions picked by the platform experts to ensure you start your Nexcess hosting journey having everything you need.
- WordPress database setup — changing the database prefix
- How to open browser console for inspection
- Scope of support for Managed Magento