Search
Close this search box.

Clean Your WordPress Database By Removing Orphaned Tables

[updated_on]
Share this post:

This tutorial will show you how to clean your WordPress database by removing orphaned tables.

Why is that important?

If you have had a WordPress site for any amount of time, then you will have installed and removed many plugins.

Often those plugins leave tables in your database even after the plugin has been deleted.

Those are called orphaned tables.

The presence of orphaned tables isn’t a huge deal, but when you’re optimizing your site, every little bit helps. And remove these tables is very easy.

Carry on to see how step-by-step.

You can either watch the detailed video tutorial below or scroll below that to read the image/text version of the tutorial.

Step 1 – Add a New Plugin

What you need to do first is go to your WordPress dashboard and add a plugin by clicking on Plugins, then Add New.

Look up the plugin keyword Garbage Collector.

The plugin we want is by Vladimir Garagulya. The plugin is not tested in the most recent version of WordPress so make sure you backup your site in order to avoid any mishaps.

Click on Install Now and then Activate.

Step 2 – Open Garbage Collector Menu

In order to set up the plugin, you’ll need to click on Tools and then find a new option called Plugins Garbage Collector.

Step 3 – Scanning the Database

When you click on Plugins Garbage Collector, you’ll see a page with three options. We suggest you check the show hidden files box and search none-WP tables and then click on scan database.

Step 4 – Analyzing the Results

The results will be shown in three different colours – red, green and blue.

Red means that there are possible orphaned tables from plugins that aren’t being used on your WordPress site at the moment. This means that these tables ought to be deleted.

The green colour highlights tables required by active plugins.

Finally, the blue tables are from plugins that still exist on your site, but are inactive.

However, the only available option is deleting the red ones.

Once again, make sure you backup your site before making any changes and deleting the orphaned tables.

If something goes sideways it’s important to have a backup.

You can also see the size of the orphaned tables in kilobytes.

Step 5 – Check off the red ones

Mark the tables you want to delete (as shown on the next screenshot) and move on to the final step of the process.

Step 6 (also known as the final step) – Cleaning the Database

Before making any rash decisions, make sure you have a backup for your site.

This action might make your site crash and it would be useful to have a backup if it does.

Clicking on the Delete Tables button does just that.

In Conclusion

Your WordPress database should be clean and optimized from orphaned tables.

Don’t expect a huge difference in your page speed unless you had plugins such as Wordfence that can create huge orphaned tables.

All in all, it is really easy to clean your database by deleting orphaned tables. It can prove to be really useful. For more articles, videos and tutorials like this one, comment below and subscribe on the youtube channel called WordPress Tutorials – WPLearningLab.

Share this post:

1 thought on “Clean Your WordPress Database By Removing Orphaned Tables”

  1. Hey I have already installed WP optimize plugin for optimization (free version) but there is not any option to delete tables. I don’t want to install this plugin for optimization because I have already one. Just wanted to ask you any plugin that gives option to delete tables and optimize database like WP optimize. Thanks

Leave a Comment

Your email address will not be published. Required fields are marked *

WPLearningLab