How to remove plugins, completely

How to remove plugins, completely

Plugins are excellent to extend the functionality of your website. You’ve done a lot to be sure you use the right plugin. You’ve tested it and everything looks good. So you installed and activated the plugin on your “live” website.

After a while you find out the plugin isn’t what you expected. So you are going to de-activate and delete it.

Delete and clean up

Plugins you don’t use and don’t expect to use them in the future have no purpose what soever. But they still pollute the database and the file system. They unnecessarily slow down your website. They can even become a security problem┬ábecause they will rarely be updated.

A long list of plugins, of which only a part is being used, only makes the configuration confusing. The goal of cleaning up is to just have the theme, plugins and content you need. All the other is ballast, that can even harm your website.

Are you going to use a plugin you’ve tried and deleted before, just download and install the most recent version. Do you want to remember which plugins you’ve used, document all your findings outside WordPress!

The cleaning method

First check the options of the plugin that you want to remove. Some plugins have an option called something like “Delete all data after deleting”. If it does, turn this option on!

Step 1

Go to the “Installed plugins” and click on “Deactivate” to deactivate the plugin you want to delete. Next click on delete to start deleting the plugin. You get a popup asking if you are sure you want to completely remove the plugin and its data.

Schermafdruk van 2016-08-25 20:30:07

Step 2

After deactivating a plugin you want to make sure everything that’s related to the plugin, is actually removed. So the second step is to check the database.

Some plugins create their own tables to store information. After deleting the plugin, these tables should be gone too. But not all plugins clean up everything as promised.

Check your database by logging in on phpMyadmin. Open the database of your website and check for tables that do not belong to WordPress itself. Often these tables have an extra prefix, like the initials of the plugin. These tables can be deleted.

database

In this example you see a couple of tables that belong to WordPress (ph_usermeta, ph_users). Also you can see tables that start with ph_wf. In this case these tables belong to the plugin Wordfence. I completely deleted the plugin Wordfence, but as you can see, it left the tables behind.

You can remove unnecessary tables by choosing the option “Drop”. Always have a recent backup at hand, because after deleting a table, you cannot undo it!

Step 3

Plugins install files and folders when activated. After deleting a plugin, all files and folders should also be removed. Unfortunately not all plugins to a complete cleanup. They leave behind files and even complete folders. Often with logging or cache files. Because the plugin was deleted, you don’t need these files and folders anymore.

You can delete files and folders by using the file manager in your cPanel or DirectAdmin. You can also use a FTP program like Filezilla.

directory

In this example you can see two files in the WordPress root that don’t belong to WordPress itself: .user.ini and wordfence-waf.php. The php file will be removed after deleting the plugin. The .user.ini won’t. After examining the file with a file editor I found out it was part of the Wordfence plugin. So it is safe to delete it.

Did you use a caching plugin and decided to delete it? Almost every caching plugin leave the cached files and folders behind upon deleting the plugin. You will have to delete them manually. Please do, because caching files and folders use a lot f storage room and can cause security issues.

Step 4

Check your .htaccess file! Some plugins, like W3 Total Cache, edit the .htaccess file. This code should have been removed when deleting the plugin. To be sure, check this file and delete all obsolete code manually. Always backup the file before editing it!

Conclusion

Cleaning up WordPress has many advantages. By keeping your website clean, you also keep it faster, safer and uncluttered. What you see, is what you have.

Do you clean up your WordPress after deleting plugins? You know that these principles can also be used for deleting themes?

Ronald Heijnes

Since 2008 I have been busy with the functionality, management, maintenance and performance of self hosted WordPress. I like to share this knowledge!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz
Close Menu