• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

Removing Database Tables After Deleting Unwanted Plugins

Delete Plugin Database TablesIf you’re a bit like me, you’ve probably installed hundreds of different plugins to test out.

Nowadays i use a demo site for testing but before this i used this sites installation.

I’ve noticed that even when you deactivate and then delete a plugin entirely, you’ll still find some tables for the plugin remaining in your database. Why?

When you delete a plugin it normally only deletes the plugin files from your plugins folder and not the database tables.

Here’s an example: Note the ‘Yes, delete these files’ text.

Delete Plugin Files

There’s normally no mention of deleting and removing the database tables created in your MySQL database when you install a plugin for the first time.

You can easily view your plugin tables using phpMyAdmin which you can access by going to your web hosts cPanel > Databases > phpMyAdmin and selecting the database from the left hand sidebar for your WordPress installation.

Databases

I like to run my database as efficiently as possible and run a database optimization plugin every week to remove unwanted post revisions.

Your can delete unwanted plugin tables in your database 2 ways:

  1. Manually in phpMyAdmin or
  2. Using a database plugin which offers the function to Drop/Empty database tables

Deleting Unwanted Plugin Database Tables in phpMyAdmin Manually

Example: Lets take a look at the database tables left behind on this site and compare it to the plugins i have active or inactive on this site.

Caution: Always create a backup of your database using the phpMyAdmin Export function or a database backup plugin before deleting database tables.

This way i can safely delete any unwanted database tables from plugins which i have already deleted from my WordPress plugins directory.

Deleted Plugin Database Tables

The above screenshot clearly shows several rows of database tables left behind after i have deleted the plugin WP Download Monitor.

This proves that your plugin database tables will be left behind even after you delete the plugin files in your WordPress Installed Plugins screen.

To delete these database tables manually, simply check the box next to the tables you wish to remove and click the Drop link next to the red button on the same row.

Deleting Unwanted Plugin Database Tables Using a Plugin

There’s a few database plugins which you can use to delete tables that you no longer need after deleting the plugin files.

WP Database Backup plugin offers a feature which will drop database tables.

The plugin will simply access phpMyAdmin and delete the tables which you select which is pretty much the same as deleting them manually in phpMyAdmin.

Here’s a screenshot below which shows you the option to either Empty or Drop tables.

WP DB Manager - Drop or Empty Database Tables

Once you install the WP DB Manager plugin, simply navigate to the Empty/Drop link in the plugin settings and check which tables you need to drop.

1. EMPTYING a table means all the rows in the table will be deleted. Backup Your Database First
2. DROPPING a table means deleting the table. Backup Your Database First

I tested both methods for deleting database tables left over after deleting unwanted plugins and these methods work fine.

I don’t think a plugin exists currently which will automatically remove plugin database tables when you delete a plugin.

Know of any? Please leave a link in the comments. Thanks

Reader Interactions

Comments

  1. Phil Duncan says

    November 3, 2014 at 12:30 am

    You might also checkout this plugin to help with this task:

    https://wordpress.org/plugins/plugins-garbage-collector/

    It seemed to do a good job on our multisite network where we needed to locate no longer needed plugin tables in 60 plus sites.

    Log in to Reply
    • Brad Dalton says

      November 3, 2014 at 11:30 am

      Thanks Phil

      Log in to Reply
    • Brad Dalton says

      November 3, 2014 at 11:47 am

      Try this http://wpsites.net/web-design/add-different-background-image-to-cover-full-body-on-specific-page/

      Log in to Reply
  2. Dorian says

    September 21, 2014 at 1:15 pm

    Only “WP-DBManager” had these features…

    Log in to Reply
  3. Jonathan says

    February 18, 2014 at 10:34 am

    I also noticed (at least a few) plugins also use the table wp_options to store some settings. You might want to check this table out as well!

    Log in to Reply
    • Brad Dalton says

      February 18, 2014 at 3:37 pm

      Thanks for the tip Jonathan

      Log in to Reply
  4. mark says

    June 27, 2013 at 6:42 am

    thanks !

    Log in to Reply
    • Brad Dalton says

      June 27, 2013 at 6:58 am

      You’re welcome

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.