5 Best plugins to clean WordPress database from Garbage

By on May 2nd, 2021

First of all, why is it important to keep the WordPress database garbage free and clean?

A clean database of the website is like a healthy stomach for a person. If a person eats unnecessary, improper food, then it will affect the person’s health. And somewhere he/she will feel sick and can not concentrate on the work. As a result, the work can be delay, and sometimes the person will not be in a condition to work.

It happens to our websites too, where the result will be like webpage loading time issues, Data management failure, Database Crash, etc. In this article, we will learn about how we can stop these typw of damage to our website—also, the tricks for having a healthy database for the websites.

Firstly, we have to understand what is the main reason why the database cannot be clean on it’s own. I mean, we need to know the main reasons behind the unhealthy Database. Because we can’t answer if we don’t have a question. So here is the list of the reasons which affect our database and make it unhealthy.

  • The web pages are not optimised
  • Issues with Requests
  • Too much flash content
  • Irregular Cache clearing
  • File Compression issues
  • Too many ads

The optimization process is nothing but recognizing the unnecessary and unethical data from the Database. After identifying the issue, we have to alter, replace or delete the data from our Database if not required. Many business enterprises which are already working with more than one country will regularly depend on the Database. Their customer details, Invoices, emails, and many more important data can be saved in the Database. So, keep the Database clean and value the quality data of the Database.

Here is the solution to how we can remove the unnecessary data and optimize the database speed. In WordPress, there are some plugins available that are very popular. But before you start cleaning your Database, make sure that you create a backup of your Database. You can use one of the best backup and restoration plugins called UpdraftPlus. This plugin will help you create a database backup and store it in cloud storage like Google Drive, DropBox, Amazon Cloud, or FTP server. So, I hope you will create a data backup of your database and WordPress files first before trying out anything.

Here is the list of plugins we are going to learn in this tutorial.

  1. WP Optimize
  2. WP Sweep
  3. Advanced Database Cleaner
  4. Plugins’s Garbage collector
  5. Breeze by Cloudways

We will learn about all the plugins in detail. So, Let’s get started with the first one from the list.

1. WP Optimize

WP Optimize: Clean, Compress, Cache

The WP-Optimize is an all-in-one app where you can clean your Database, Compress your large files, and clean the cache of your website. In short, this plugin is revolutionary because this plugin will make your website more smooth and fast than ever before. And, WP Optimize is also one of the most successful WordPress plugin to keep the database clean and optimised.

So, let’s see how we can optimize our WordPress website with the WP-Optimize plugin.

Step 1: Install and Activate the WP-Optimize plugin on your WordPress.

Install and activate WP Optimize plugin in WordPress

Step 2: Take your mouse pointer on the WP-Optimize tab from the sidebar, then click on the Database tab option.

Database operations in WP Optimize

Step 3: Now, you’re on the dashboard of the WP-Optimize plugin. You can see three tabs on the top of the page. Click on the Optimization tab.

List of database optimisations available

Step 4: Then, Scroll-down the page and find the Run all selected optimizations button, as you can see in the below image.

(This button will help you to Run the Optimization on your website. You can see a list of the optimizable contents. Select the required optimization for your site in case it is not selected.)

Run the database optimisation in WP Optimize

Step 5: You can even optimize the different content separately. You can see a Run-optimization button in front of all the optimize friendly content.

Run different optimisations individually

Step 6: Now, Click on the Tables tab.

Database tables list in WP Optimise

Step 7: Then scroll down the page, and you’ll see a list of Tables used in your WordPress site. With the table you’ll be able to see the Remove button. 

List of tables in WordPress database

Step 8: Click on the Remove button to delete the table. You will see the remove button only on non-required tables.

Remove unnecessary tables from WordPress Database

Step 9: Then Click on the Settings tab from the navigation section given on the top-right corner of the page.

Step 10: In the Setting tab, Scroll-down the page and find Scheduled clean-up settings.

(This setting will help you to create a schedule for regular clean-ups.)

Scheduled Backup optimisation

Step 11: To set up the Scheduled cleaning, Click on the “Enable” checkbox, as you can see in the below image.

(After you click on the checkbox, you’ll be able to select the Schedule type. You have options like Daily, Weekly, Monthly. Then choose the optimizations you want with a checkbox from the list.)

Scheduled database optimisation in WP Optimise

Click on the Save Settings button to save the changes and enable the automatic optimisation.

Step 12: After that, Let’s understand Image Optimization. Click on the Images icon available in the top right corner beside the database icon.

Image optimisation in WP Optimize

Step 13: Then, Find and Turn-on toggle button. This toggle button will help you to compress the newly added files automatically. The second toggle will give you the image compression information on the dashboard.

Image compression in WP Optimize plugin

Step 14: Then, just below the toggle setting, Find Compression options. Select the first Radio Button, which allows you to compress the image as much as possible. If you want to retain the details in the image, select the second radio button.

(While you want to do compression as per your requirement, click on the custom Radio button. After that, you’ll be able to see a slider for image compression type. Slide the slider as per your requirement. )

Automatic Image compression in WP Optimize

Step 15: The last step is how to clear the cache of the website. Click on the cache icon that is available on the top right corner beside the Images icon.

Clearing cache using WP Optimize

Step 16: After that, You’ll see a toggle button with an Enable Page cache label. Turn on the Toggle button, then click on the Purge cache button available just below the toggle to clear the cache that is already present on the site.

(This button will help you to clear page cache.)

Enable and clear the page cache using WP Optimize

So, this is how we can use the WP-Optimize plugin in WordPress. We just learned How to clear databases, Compress the big images and clear the page cache memory. In conclusion, The wp-optimize is an all-in-one plugin to optimise your whole WordPress site. Indeed, it is one of the most popular plugins for this purpose in the market.

2. WP Sweep

WP Sweep plugin for WordPress


Wp-Sweep is an open-source plugin that is available in the WordPress library. This plugin will help you in several ways like Delete Comments, User’s data, Duplicate data, etc. So, let’s see how we can use the WPSweep plugin.

Step 1: Install and Activate WP Sweep in your WordPress site.

Install and activate WP Sweep plugin for WordPress

Step 2: Find & Click on Tools tab from the Left sidebar, Then Click on the Sweep Tab from the Expanded tab.

Go to WP Sweep Dashboard in WordPress

Step 3: The page will redirect to the Sweep setting page, it should look just like the following image.

(Here, you can see different sweep sections like Post Sweep, Comment Sweep, User Sweep, Term Sweep, Option Sweep, Database Sweep.)

Optimisation options available in WP Sweep

Step 4: Now, Go to each section and see the all Options list. You can see two buttons in front of some Options. Buttons are Sweep and Details. Click on the Sweep button to perform the cleaning task.

( Scroll-Down and see other options too, The details button will help you to see the details about the option in detail.)

List of optimisations available in WP Sweep

So, this is how you can keep your database clean from garbage data. This plugin does not allow us to schedule the database cleaning process. However, it is one of the simplest plugin available in the market. If you just want to clear the very obvious unwanted data in a while, you can use this plugin!

3. Advanced Database Cleaner

Advanced database cleaner plugin for WordPress

Advanced Database Cleaner is an effective plugin that allows a user to clean the Database and optimize the website. This plugin will help you clean revisions of pages and posts, old auto drafts, pending comments, spam comments, orphan user data, and much more. It also supports Scheduled clean-up, which is a great feature too. Based on the feature list of a free version, it can be a must-have plugin for WordPress websites.

The Advanced Database Cleaner will also help you to get an overview of your website. It provides a dashboard that gives you health reports. And erasing the unwanted files and data also provides the most space for your site data.

Let’s see how we can use this plugin in WordPress.

Step 1: To Use this plugin, Install and Activate the  Advanced Database Cleaner on your WordPress.

Advanced Database cleaner plugin for WordPress

Step 2: Click on the WP DB Cleaner tab from the Left-sided tab section.

Go to WP DB Cleaner dashboard

Step 3: After the click, the page will redirect to the WP DB Cleaner plugin main page. Click on the first tab as General clean-up.

(You can see some tabs like General clean-up, Tables, Options,cron jobs, Overview & settings)

General Database clean up in WordPress

Step 4: On this page, You can see a list of elements that require clean-up. Click on the checkboxes to select the part. (you can select the first checkbox from the heading to select all features.) 

Then select the clean option from the Drop-down, which is available beside the Apply button.

List of optimisation options available

Step 5: Click on the Apply button to apply the changes and start the clean-up process.

Start the database clean up process

Step 6: Then, just beside the Element list, you can see two boxes. Click on the Add New Schedule button to add a new cleaning schedule for the website.

(The first box has a Bell icon with notification of how many elements can be cleaned at this time. And, the other one is for creating a new Schedule for clean-up regularly and automatically.)

Add new automatic clean-up schedule

Step 7: On the next page, You will have a list of Elements. Select the Elements you want to include in the schedule. Then besides the Element list, you can see some fields like Name, Frequency, Start Date, Start Time, and Schedule Status.

Create a schedule for automatic database clean-up

Step 8: Now, enter the details in the fields we saw before the step. Then Click on the Save the schedule to save the settings.

(Enter the Schedule Name, Frequency means the Scheduling period like Daily, Weekly, Start Date, Start Time, and the Status.) 

The features we used in this tutorial are available in the Free version, You can buy the premium version for advanced features like Tables optimization and Site optimization.

4. Plugins Garbage Collector

Plugins Garbage collector plugin for WordPress

Plugins Garbage Collector, Which is one of the essential plugins for WordPress sites. WordPress is now world’s most used platform for creating and managing websites, and the plugin library makes it more flexible and effective. As we know, we can install the plugins as many as we want on our site. But after some time, The plugin will produce junk files in WordPress. We call it Garbage which is not helpful, and it also affects our website’s performance.

Here is the plugin that will scan all the plugins and collect the Garbage from the plugin’s files. You can delete the garbage with one click, so let’s see how we can use this plugin.

Step 1: First of all, Install and Activate the Plugins Garbage Collector in your WordPress.

Plugins Garbage collector plugin WordPress

Step 2: Now, Hover the mouse on the Plugins Tab from the Left-Sided tab section. Then click on the Installed Plugins tab.

List of installed plugins on WordPress

Step 3: Now, find the recently installed plugin called Plugins Garbage Collector. The Click on Scan link, which you can see just below of the Plugin name.

Run Scan for Plugins Garbage collector

Step 4: Then, you will find some options to clean the Database. Select an option as per your requirement. Click on checkbox in case you want to see the hidden tables too. Then Click on the Scan Database button to start the scan. 

Database cleanup options in Plugins Garbage collector

Step 5: Just after that, you notice a Browser Pop-up box on the windows. Click on Yes to start the scan. (The pop-up box is saying that the process will take some time.)

Confirm the database cleanup process

Step 6: You’ll see a list of inactive and unused Database Tables just after the process completion. 

Click on the checkbox to select the table to be hidden. See the status of tables on the right side. It says the table is inactive, and some are used too.

List of unwanted database tables in WordPress

Step 7: Then Scroll-down to the page bottom and see a button with a label as Delete Tables. Click on the Delete Tables button to clean the Database.

(Make sure you already have a backup because these files will be erased permanently.)

Delete unwanted database tables in WordPress

Step 8: Then, a pop-up box will again come up with 2 options. Click on OK to start the clean-up process.

Congratulations, You just successfully clean your Database. This plugin only allows you to clean up the database with unwanted and unused tables generated by plugins. It is a very handy feature if you want to find and clean the plugin garbage.

5. Breeze by Cloudways

Breeze - WprdPress Cache plugin

Breeze is a simple and powerful plugin that was introduced by cloudways. This plugin will help you to optimize the website and improve the speed of your website. It works excellent with WordPress and even with woo-commerce. It also supports multi-site optimization. But the main reason behind the popularity of this plugin is, It’s simplicity. Let’s see how we can use this plugin in our WordPress.

Step 1: First, Install and Activate the Breeze plugin in your WordPress. 

Install Breeze plugin in WordPress

Step 2: Then, Hover your mouse on the Setting tab, Which is available on the Left-sided tab section. Then click on the Breeze tab from the expanded tab.

Go to Breeze plugin Dashboard in WordPress

Step 3: The next page is the Breeze setting page. Click on the first tab BASIC OPTIONS tab, then you’ll see some setting options, as you can see in the below image. Click on the checkbox to enable the setting. Then click on the Save Changes button to save the settings.

(Here on this page, you can see settings options like cache scan time, Minification of add-on files. There’s an option for Gzip compression, which helps you to compress the files over the network.)

Basic caching options in WordPress

Step 4: Now, Click on the second tab called ADVANCED OPTIONS.

Advanced settings in Breeze WordPress plugin

Step 5: This section will help exclude some of your selected URLs from the optimisation options we have selected. You can create groups of the related files by clicking on the checkbox. Even you can exclude the JS and CSS files too. Enter the data as per your requirement. Then click on the Save Changes button.

Save Changes

Step 6: After that, click on the DATABASE tab, which is available beside the ADVANCED OPTIONS.

Step 7: On this page, you’ll see some options which can be optimized. Click on the first checkbox called Select all, in case you want to optimize all the Elements.

(You can click on the individual checkboxes too.)

Then click on the Optimize button to start the scan.

Database optimisation options in Breeze plugin by Cloudways

Step 8: After that, Click on the CDN tab that is available beside the DATABASE tab.

Step 9: Click on the checkbox called Activate CDN. Then fill in the details like Name, Content, Exclude content. Then click on the Save Changes button.

Set up CDN in WordPress using Breeze

Step 10: Click on the Second the last tab called VARNISH.

Step 11: The VARNISH feature will be ON by default. In case you want to turn OFF the Varnish feature, you can click on the checkbox and uncheck it. Click on the Purge button, then click on the Save Changes button.


Conclusion: So, this is how you can optimise the database of your WordPress site. If your WordPress site has tens of writers and tens of plugins with lots of visitors, you must clean up your database to keep your site performing great! Some of the above listed plugins will allow you to set the automatic schedule for cleaning up the database. And two of the plugins that provide this functionality are completely free! If you simply want to clean up the WordPress database from garbage, you can use the Advanced database cleaner plugin too!

If you have any questions, please let us know in the comment section given below. If you are facing any hosting related issues, Please contact our 24*7 awesome support staff for quick help!

Leave a Reply