Cart (0)
  • Your cart is currently empty.

NEOSERV BLOG

Tips, guides and useful information about domains, hosting, SSL certificates, email, web optimization and online security.

Odstranitev WordPress vtičnika
Category: Websites
Published:

Installing WordPress plugins that add extra functionality to your website is easy. Many of them are freely available via the WordPress administration and it only takes a few clicks to get the plugin installed and active. Deactivating and removing a plugin can also be done in just two clicks. But is this the right way to remove it?

Most of the time not, as uninstalled plug-ins can leave behind a lot of unnecessary data. Some in the form of files and folders, but more often in the form of tables and rows in the database. When you want to achieve a certain functionality on your website and you test several plugins for this purpose, a large number of tables quickly appear, which have a negative impact on the speed of the page and thus on the user experience.

So here are some tips on how to remove plugins in a way that doesn’t leave behind unnecessary data. And since the removal methods depend on the plugin itself, we’ll also take a look at some very popular ones that you may have used, or may still be using, but would like to remove (completely).

Sitemap

  1. The problem with uninstalling plug-ins
  2. Why are plugins not being deleted completely?
  3. Don’t forget to backup!
  4. Uninstalling popular plugins
  5. Final Word

1. The problem with removing plug-ins

First, let’s look at the specific example of the Wordfence Security plug-in and see what happens if you delete it using the normal method. We installed this plugin, which is designed to ensure the security of a website, and then immediately deactivated and deleted it.

Disable WordPress Plugin

Delete WordPress Plugin

Now let’s see what’s left of it in the MySQL database, which can be accessed via the phpMyAdmin tool available in the cPanel control panel.

Wordfence Security – MySQL Tables After Plugin Removal

As you can see in the picture above, after the “classic” removal of the Wordfence Security plugin, there are 21 tables left in the database. Actually, that’s not all, there are still a few redundant files left in the wp-content/wflogs folder on the server.

Wordfence Security – Files After Plugin Removal

If you’ve been removing plugins in this way for a long time, you’ve probably accumulated a lot of unnecessary files, folders and database tables in your hosting package.

Do you have a lot of plugins deactivated on your website? Deactivated plugins are just inactive, but they still leave a lot of data in the database. This not only compromises the speed of the website, but also its security, especially if the deactivated plugins are not updated. Therefore, it is definitely worth considering completely removing plugins that you do not need.

2. Why not delete plug-ins completely?

Wondering why plugins don’t have the option to be deleted completely after uninstallation? Why do developers program plug-ins in a way that leaves traces in the database and sometimes in files and folders? There are several reasons, but let’s look at the most obvious ones.

1. They want to preserve user settings

The main reason why some database plugins leave behind certain tables is related to preserving user settings. We may delete a plug-in and later decide to reinstall it. Since the settings will already be recorded in the database, they will not need to be edited again.

There may also be situations where we accidentally uninstall a plugin. If this happens, we will not have to worry about losing all the data and settings associated with the plug-in.

2. They are not interested in the functioning of the website

Some developers are of the opinion that the tables that remain in the database after removing plug-ins do not affect the loading speed of the website. If it’s just a plugin or two, there may not be a problem, but in the long run, the database may accumulate a whole series of tables with thousands of rows of data.

Database queries have a big impact on the performance of a website, especially if the developer has not been careful and his plug-in is running a lot of queries. In addition, redundant data and files also affect the space used on the server, which is limited with some hosting packages.

3. They made a mistake

The WordPress.org website contains instructions for WordPress developers. One of the chapters is the “Plugin Handbook“, which explains, among other things, what the programming code is for removing a plugin.

It may happen that the developer does not check or follow the instructions, which may result in incomplete removal of the plugin when clicking the Delete button in the WordPress administration.

However, most WordPress plugins can be uninstalled in a way that leaves no unnecessary data behind. Unfortunately, we have not yet seen a uniform system for complete removal (including data and settings), so procedures may vary.

3. Don’t forget to back it up!

Before you start manually removing plugins, i.e. deleting files and folders and removing rows or entire tables in the database, you need to have a backup copy of the website. This way, if something goes wrong during the deletion process, you’ll be able to restore your WordPress site to its previous, working state.

The good news is that at NEOSERV we understand the extreme importance of backups, which is why we automatically create them for you every night. They are always available to you for free via the cPanel control panel, in the JETBACKUP section. There you will find backups of files and folders, databases, email inboxes, Cron jobs and DNS zones.

Detailed instructions on how to manage your backups can be found here.

4. Uninstalling popular plug-ins

Some plug-ins offer the option to uninstall them completely, but this may be somewhat hidden. For an example, take a look at the Gravity Forms plugin, which allows you to add contact forms to a web page. If we want to uninstall Gravity Forms completely, we need to do this via the Uninstall Gravity Forms button found in the settings of the plugin.

Removing the Gravity Forms Plugin

So, when you want to uninstall a particular plugin, we advise you to check its settings first, as there may be an option to uninstall it completely. You can also use Google search and check forums and official plugin documentation for the correct way to delete a plugin.

Let this be a basic guideline, but below you’ll learn more about how to completely remove some of the most popular WordPress plugins at the moment.

WooCommerce

Deactivating and deleting the WooCommerce plugin in the WordPress administration only removes the plugin and its files, while settings, products, orders, pages, etc. still remain in the database.

If we want to remove the WooCommerce plugin completely, including orders, products, etc., we first need to make a change to the wp-config.php file, which is located in the base folder where we installed WordPress. We need to edit this file BEFORE deactivating and deleting the plugin.

1. Open the cPanel control panel (login instructions), locate the FILES icon group and click on the File Manager link.

2. Navigate to the root directory of your WordPress website and right-click on the wp-config.php file and select Edit.

File Manager – Editing wp-config.php

3. Scroll to the bottom of the file and just above the comment /* That's all, stop editing! Happy publishing. */ add a record: define( 'WC_REMOVE_ALL_DATA', true );

Code for Complete Removal of WooCommerce Plugin (wp-config.php)

4. Save the changes by clicking the Save Changes button in the top right corner.

5. Deactivate and delete the WooCommerce plugin in the WordPress administration.

This removes all data related to the WooCommerce plugin from our website. The line we added to wp-config.php can now be deleted.

Wordfence Security

The Wordfence Security plugin, designed to protect your website, consists of:

  • Plugin files (in the wp-content/plugins/wordfence folder),
  • database tables (prefixed with wf),
  • firewall settings files (in the wp-content/wflogs folder).

If you have set up the firewall with the advanced Extended Protection method in the plugin settings, the plugin will also create a wordfence-waf.php file in the base folder where you installed WordPress. There will also be a few lines of additional code in the .htaccess, .user.ini or php.ini file.

The procedure for removing the plugin, including the files and tables, is quite straightforward.

1. In the Wordfence Security plugin settings, look for the option to delete all files and tables in the database associated with the plugin when deactivating and removing the plugin.

Wordfence -> All Options -> Wordfence Global Options -> General Wordfence Options

Wordfence Security – Basic Settings

At the bottom there is a box with Delete Wordfence tables and data on deactivation, which you need to tick and then save the changes.

Wordfence Security – Settings for Complete Plugin Removal

2. Next, we need to activate the setting that will remove the tables related to security for logging in to the WordPress administration.

Wordfence -> Login Security -> Settingstab

Wordfence Security – Settings for Complete Plugin Removal (2)

At the very bottom there is a box that says Delete Login Security tables and data on deactivation, which you need to tick and save the changes again.

3. Now we can disable and delete Wordfence Security from the list of plugins.

Did you uninstall a plugin a while ago, but now you just want to clean up what’s left behind? The easiest way to do this is to reinstall the plugin, tick the two aforementioned settings, then delete the plugin. Alternatively, you can delete the wflogs folder and any database tables that the plugin created when it was installed.

Yoast SEO

The Yoast SEO plugin is designed to optimise your website for search engines. The removal process is a bit more complex as it involves deleting the data in the database.

1. If you have the plugin installed, first deactivate and delete it in the WordPress administration – on the plugins list page.

2. Log in to the cPanel control panel (login instructions) and select phpMyAdmin in the DATABASES icon section. The database management tool will open in a new tab.

cPanel - phpMyAdmin

3. On the left-hand side , select the database associated with the website from which you want to remove data related to the Yoast SEO plugin. We’ve written how to find out which database WordPress uses in this article.

4. Select the Search tab at the top, enter the query wpseo in the search box, click Select all, select all tables and click Go (bottom right).

phpMyAdmin – Search Query for wpseo

5. The search query will show us which tables contain data that include the wpseo record. Among other things, they are found in the wp_options table, so first click Browse on that table.

phpMyAdmin - wpseo - wp_options - Browse

6. In the top box(Filter rows), type wpseo, then click on Check all to select all rows and click on Delete to delete the selected rows. In the next step, click Yes to confirm our request.

phpMyAdmin – wpseo – Deleting Rows

7. Repeat steps 4 to 6 a few times, except that instead of selecting the wp_options table, we select the other tables where the wpseo records are located. Delete the rows containing the record in these tables as well.

8. Check in the same way for the wp_yoast record. If it is found in any of the rows, delete it.

9. You may notice that there are a few more tables in the database (in our case five) created by Yoast SEO. Let’s highlight these tables and delete them using the Drop function. In the next step, we confirm our request by clicking Yes.

phpMyAdmin – Yoast SEO – Deleting Tables

The Yoast SEO plugin may have also created a Cron job called wpseo_onpage_fetch. We can check this with the WP Crontrol plugin, which can also be used to remove this task. After installing the plugin, the list of tasks can be found under Tools -> Cron Events.

WP Rocket

WP Rocket is a popular plugin for fast website optimisation. If you decide to use another plugin for this purpose (e.g. LiteSpeed Cache for WordPress), it makes sense to uninstall WP Rocket.

1. First, clear the cache in the WordPress administration. This is done via Settings -> WP Rocket -> Dashboard, where you click on the CLEAR CACHE button.

WP Rocket – Cache Cleaning

2. On the list of installed plugins page, find WP Rocket, deactivate it and delete it.

3. This should remove the plugin completely, but it may be useful to check a few files and folders manually and remove them if they are present.

  • Delete the wp-content/cache and wp-content/wp-rocket-config folders.
  • Delete the wp-content/advanced-cache.php file.
  • In the .htaccess file, remove everything between the lines #BEGIN WP ROCKET and #END WP ROCKET (including these lines). Save the changes.
  • In the wp-config.php file, remove the line define('WP_CACHE', true); and save the changes.
  • In the database, open the wp_options table, search for the rocket record and delete the rows with that record.
  • In the database, delete the tables created by the WP Rocket plugin (e.g. wp_ wpr_rucss_resources and wp_ wpr_rucss_used_css).

For how to search for rows in the database with phpMyAdmin, see the section where we describe how to remove the Yoast SEO plugin (points 2-6). There you will also find instructions on how to remove each row or table.

WP Super Cache

The WP Super Cache plugin is designed to cache and thus speed up your website. If you want to remove it, you can do so using the following procedure.

1. In the website administration, open the WP Super Cache settings and turn off caching(Settings -> WP Super Cache -> Easy tab -> Caching Off). Save the changes by clicking on the Update Status button.

WP Super Cache - Caching Off

2. Click the Delete Cache button to clear the cache.

3. On the list of installed plugins page, search for WP Super Cache, deactivate it and delete it.

4. Check a few more files and folders manually and remove them if they are present.

  • In wp-config.php, remove the line define('WP_CACHE', true); and save the changes.
  • In the .htaccess file, remove everything between the lines #BEGIN W3TC Page Cache core and #END W3TC Page Cache core (including these lines). Save the changes.
  • Delete wp-content/advanced-cache.php and wp-content/wp-cache-config.php.
  • Delete the wp-content/cache folder.
  • Delete the wp-content/plugins/wp-super-cache folder.

5. Final word

Have you been uninstalling WordPress plugins so far by just deactivating and deleting them? The next time you want to uninstall a plugin, you’ll probably want to look a little deeper into the process. Most plug-ins have good quality documentation that explains exactly how to uninstall the plug-in completely. Others even have an option in the settings to remove it completely.

So the next time you are deciding whether or not you need a particular plug-in, consider whether you might need it in the future. If you do, it will probably make sense to keep your current settings in the database. Otherwise, just take the time to find out how to remove the plugin completely. This will keep your database clean, and by removing unnecessary files and folders you will also save on hosting package space.

Finally, let’s write it down one more time. Backups are extremely important! Before you start removing rows and tables in your database, it is essential that you have a backup of your database. And when you decide to manually delete files and folders, you must also have a backup of that part of the site.

Order Web Hosting NEOSERV

If you choose to host your website with us, you’ll have peace of mind about backups, as we make them free of charge on a daily basis. In addition, with NEOSERV, your website will be hosted on an extremely fast server located in Slovenia, and you will be able to manage your hosting package via the user-friendly cPanel control panel. And last but not least… our expert support will always be at your disposal – even at night, on weekends and on holidays.

COMMENTS

COMMENT THE POST

(mandatory)
(mandatory, email address will be hidden)
(optional)
Security question that confirms you are a real person.