blog posts

How to Properly Uninstall a WordPress Plugin

How to Properly Uninstall a WordPress Plugin

After installing WordPress, one of the first things you do is install a plugin. As your site and skills grow, you’ll quickly realize that some plugins aren’t right for you. Well, it is important to disable and remove those plugins. In this article, we’ll show you how to uninstall a WordPress plugin properly and explain why it’s important.

Why should we uninstall the WordPress plugin?

  • There are thousands of plugins in WordPress that we can easily install on our site. However, some plugins are not used over time due to a lack of necessary functionality.
  • WordPress plugins are like programs you install and run on your mobile phone. These programs indeed give you more control over the site. But with all the efforts that plugin designers have made to make plugins safe, sometimes mistakes happen. It means that the plugin you used on your site caused problems.
  • Also, keeping some unnecessary files on the site increases the time to back up WordPress, download, or restore the backup.

According to WordPress, we suggest that if you have installed a plugin and do not use it for any reason, you should delete it properly.

The difference between deactivating and uninstalling a WordPress plugin

Many users have the habit of simply going to the plugins page and disabling the plugins they don’t want to use.

In most cases, disabling a plugin without permanently removing it has been useful for temporary fixes because it keeps your settings and configuration in place when you re-enable it. However, most users find an alternative plugin that makes them stop using the disabled plugin.

Most people don’t take proper security measures like adding a firewall like Sucuri, disabling PHP execution, etc. It should be noted that a disabled WordPress malicious plugin can also make your site vulnerable because malicious plugins can be used to run malicious code on your site even after being disabled.

That is why we recommend that if you no longer intend to activate a plugin, it is better to uninstall it instead of deactivating it. And by properly uninstalling the plugin, you keep your database safe from the “junk data” that most plugins bring.

Remember that you can always re-download and re-install the plugin.

How to delete a WordPress plugin

WordPress has made it very easy to uninstall plugins from the admin section. Just log into your WordPress dashboard and go to the plugins page. In this section, you will see the list of your installed plugins.

As you can see in the image below, active plugins are visible prominently, and there is edit, delete, and enable/disable buttons at the bottom of the plugin.

If you want to delete a plugin, click the delete button. Now WordPress will ask you to confirm the deletion of the plugin. You need to click the “Yes, delete these files” button. WordPress will now safely remove the plugin from your web server.

Of course, other methods exist to remove all plugin traces, but these steps are specialized and not recommended for beginners.

Remove extra files added by a WordPress plugin.

In most cases, simply uninstalling the WordPress plugin will remove it completely. Because some plugins save files outside the plugins folder, and these files are not deleted when the plugin is deleted.

Remove additional plugin data using plugin settings

Most of the famous and big plugins have a section called to delete all database data and files in their settings; you can easily use this option to delete all files and additional data from your site and host if the plugin did not have such an option, you could use the following methods.

Another method that may be a bit difficult is manually deleting the extra files and data. If you are unfamiliar with these things, we strongly recommend not using this method because you may encounter problems with your site.

For this purpose, you can use FTP software or go directly to your host after logging in to your host, click on the File Manager option to enter the file management page on the host, then go to /public_html/wp. Go to content/plugins/ and check all the folders in the host. Each of these folders in the plugins folder is related to one of the plugins you use.

But in the meantime, there are some plugins that, in addition to their folder, store some information in another folder, so it is necessary to check the folders in this directory fully. If you feel that any of the folders in this directory are related to the plugin you deleted from WordPress, you can delete the desired folder from your host.

You can compare the number of folders in this directory with the total number of plugins displayed in the WordPress dashboard to better determine if there is an additional folder in this path.
Notice

Many WordPress backup plugins, cache plugins, gallery plugins, and sliders create and store data directly in the wp-content folder. If you don’t have a full backup of your WordPress site, you should download these files as a backup to your computer and then delete them so that if something goes wrong, you can return to the original state by restoring the backup and fixing the problems.

Remove unused shortcodes in WordPress

Many WordPress plugins use shortcodes to add content to your posts or pages. Once you disable or remove the plugin, this shortcode will be visible in your posts and give your site an ugly look.
1

[plugin shortcode]

You can disable the shortcode by removing the shortcode from your posts or by adding this code in the functions.php file of your template or a site-specific WordPress plugin.
1

add_shortcode( ‘plugin shortcode’, ‘__return_false’ );

This code causes nothing to be displayed. But don’t forget that the plugin shortcode will be replaced by the shortcode tag used by the plugin you want to remove. And if you decide to use that plugin again, you should remove this code.

Clear the WordPress database

In the last step, to completely remove the information of a plugin from WordPress, it is time to go to the WordPress database. Usually, one or more tables are formed for each plugin in the WordPress database. These tables increase the backup time of the site and slow down your work process. If any of these tables is related to a plugin that has been deleted, you can delete these tables from WordPress.
Deleting additional data of plugins in the database using other plugins

To easily delete the additional data of plugins, plugins have been designed so that you can delete the data without the need for many specialized things.

One of these plugins is the WP-Optimize plugin. By installing this plugin, after deleting the desired plugin, you can delete all the tables created by the deleted plugin on your database.

Deleting additional data of plugins in the database through database management

Note: If you are not familiar with these things, do not use them in any way so that your site does not suffer.

For this purpose, after entering your host, refer to the PHPMyAdmin path.

Then select your WordPress database from the left menu, so the WordPress tables are displayed.

In this section, you can see the WordPress tables related to plugins and WordPress itself and those you have deleted.

To delete WordPress data, select the desired table and click on the Drop option on the right side of each table to delete it from the database and permanently delete the information of plugins that you no longer need and have deleted. Now you will see a warning about deleting these tables. You must click Yes to confirm the operation. Note that this action is irreversible. And after deletion, you cannot restore these tables unless you have previously made a backup.

We hope this article will help you know how to properly a WordPress plugin. Proper have any questions or problems related to deleting the WordPress plugin from the database and deleting the plugin from the host, let us know in the comments section or share your other suggested methods with us.