remove orphaned tablesWordPress plugins are easy to install and use. However when it comes to deleting them from our blog and database, it may not be so straightforward. There is always a possibility that when you delete the unwanted plugin(s) from your WordPress dashboard, the files get deleted, but the plugin’s tables are not removed from the database. These tables are we call orphaned or obsolete tables. As a result, your database get bigger unnecessarily, slows your blog down, and increase the time you do backups.

Before we begin

The two common and probably the easiest way to remove orphaned tables are using phpMyAdmin and WordPress plugins. As a precaution, before you start on any of the method, please do your backups – both your WordPress files and database.

When you have doubts on deleting a table from your database, hold on and do the necessary research on Google first. Since most of the WordPress plugins have a standard way of naming their tables in the SQL database, you can easily find out the plugin name using the database table name. If you are still using the plugin, don’t touch that table, you need to keep it. Let’s look  at the ways to remove orphaned tables from our databases.

Using phpMyAdmin to Remove Obsolete & Orphaned Tables

  1. First, login to your hosting account dashboard, then look for the phpMyAdmin icon. In this guide, I am using Hostgator cPanel, so phpMyAdmin may appear different compared to my screenshots. However the following steps can still be applied.phpmyadmin
  2. Once you enter into phpMyAdmin, on the left-hand side, select the database where the table(s) is residing on.
  3. Click on Structure located at the top of the page.
  4. Look for the table that you want to Empty or Drop, and click to execute. Empty means removing the data in the table, and keeping the structure. Drop means deleting the entire table & data  from the database.
  5. phpMyAdmin will give a pop-up requesting for confirmation. Note that both actions are irreversible.phpmyadmin drop table 1
  6. Repeat the steps for any tables that you want to remove.

Using WordPress Plugins to Remove Obsolete & Orphaned Tables

For this guide, we will be using WP-DBManager to remove orphaned tables that are left behind after we deleted the plugins.

  1. Access WP-DBManager from the left-hand side of your WordPress dashboard, Database > Empty/Drop Tables
  2. Look for the obsolete and/or orphaned database tables that you want to empty/drop. As the actions are non-reversible, do take extreme care before you execute your actions. As a gentle reminder, please backup if you have not done so.
    wp dbmanager 2
  3. That’s it! Your database size is now smaller and cleaner.

Suggestions & Tips

Tip #1: Start investigating on those tables that are bigger in size first.

Tip #2: Be mentally prepared that you may delete a table wrongly, and need to do backup & recovery.

Tip #3: It’s recommended that you do this clean-up in the morning. You won’t want to spend a sleepless night trying to fix your website or database when things get broken unexpectedly.

Tip #4: If you are using WordPress plugins to do the clean-up, it is advisable that you test it out first, before using on your actual/live website. Reason is because there can be incompatibility issues caused between your theme, settings or plugins.

Tip #5: You may want to remove unwanted plugin options from your wp_options table too.



Lincoln is a fan of Apple products, loves red wine and traveling. He blogs on internet marketing, social media, wordpress tips & guides, and using technology to maximize efficiency. Follow him on Twitter or Facebook for regular updates.

Leave a Reply

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