Plugins Garbage Collector WordPress plugin

Plugins Garbage Collector

Plugins Garbage Collector

Plugins Garbage Collector

Plugins Garbage Collector

This plugin scans your WordPress database and shows the tables which not belong to the core WordPress installation.
Some WordPress plugins create and use its own database tables. Those tables (small and large) are left in your database after plugin deactivation and deletion often. If your blog is more than 1 day old you have some plugins garbage in your WordPress database probably. With the help of this plugin you can check your database and discover if it is clean or not. Plugin shows not WordPress tables list with quant of its records, size they occupy in Kb. Plugin name and plugin state are shown too if those data are available.
Changes made to the core WordPress database tables (columns added) could be discovered too.

The latest version: 0.9.15. Click the Download button below if you wish to try it.
Quant of downloads: 50468
Attention! Starting from version 0.9.2 plugin works with WordPress 3.0 and higher only. For earlier WordPress versions use plugin version 0.9.1 from here.

Quick Links


Look at “Plugins Garbage Collector” plugin in action screenshot:

Plugins Garbage Collector in action
  • Red color rows with high probability show old deleted plugins forgotten tables, so-called plugins garbage, which can be deleted from your WordPress database with the help of Delete Tables button or some of your favorite database tools, e.g. phpMyAdmin.
  • Blue color rows show tables which belong to deactivated plugins. Those tables are probably candidates for deletion after you decide to delete theirs parent plugins.
  • Green color rows show tables which belong to active plugins. Those tables are now in use. You do not need to touch them.

How Plugins Garbage Collector works? It selects all table names from your WordPress database, excludes core WordPress installation tables, then scans your plugins directory .php files text for table names and shows you the result as written above.

Delete Tables button appears if you have red color rows in the scan results table only. You need to turn on checkbox near the table name if you decided to drop it before click the Delete Tables button.
Attention! Delete table operation can not be rolled back. Please double think what are you doing before use Delete Tables button.
Plugins Garbage Collector is the decision support tool only and its conclusion about table usage can be wrong in some (I hope rare) cases. For example, if plugin developer uses some sophisticated scheme to assign names for his tables, not puts simple text into source code e.g. ‘my_plugin_table_name’, but calculates it with some algorithm e.g. ‘my’.’_’.’plugin’.’_’.’table’, etc… Final decision is for you – blog owner.

It is highly recommended to make database backup before apply any actions to your WordPress database.

Do you have a suggestion what useful feature we can add to this plugin? Please, left your comments.


Dear plugin User,
if you wish to help me with this plugin translation I very appreciate it. Please contact me via Contact form and I will answer you by email. Do not forget include your site link in order I can show it with greetings for the translation help at, plugin settings page and in this readme.txt file. If you have better translation for some phrases send it to me. You are welcome!

Special Thanks to

  • alx359 – for contribution to the source code which fixed AJAX empty response for WordPress multi-site with subdomains and other stuff.

You are welcome! Help me in the bug hunting, share with me new ideas about plugin further development, contribute to the source code and link to your site will appear here.



  • 01.12.2014
  • Fix for fatal error during activation with fresh install of WordPress 4.0 (missed WPLANG constant caused plugin to stop execution). Unfortunately it worked fine under WP 4.0 with wp-config.php from previous version with WPLANG defined.


  • 30.06.2014
  • Polish translation was updated. Thanks to Grzegorz Janoszka.


  • 2.12.2012
  • Dutch - Nederlands translation was updated. Thanks to Harald Labout.
  • load_plugin_textdomain() call moved to the 'plugins_loaded' hook for higher compatibility with translation plugins.


  • 31.10.2012
  • In case other plugin had some uppercase letters at the DB table name PGC failed to define that plugin as table owner. It is fixed now.


  • 22.08.2012
  • Minor code cleanup and unused piece of code removing


  • 16.07.2012
  • Polish translation is added, thanks to Esej Konrad Łącki.


  • 15.04.2012
  • Lithuanian translation is added, thanks to Vincent G.


  • 28.07.2011
  • AJAX empty response for WordPress multi-site with subdomains is fixed - thanks to alx359.
  • AJAX error processing is enhanced slightly.
  • Minor enhancements to plugin page CSS are made.


  • 16.01.2011
  • Chinese Simple translation is added.
  • Minor change to pgc-ajax.js errors processing is made.


  • 28.12.2010
  • Italian translation is updated.
  • Latin translation is added.
  • Thanks to Alessandro Mariani for these translations update.


  • 14.10.2010
  • Bug fix: database table names had been processed in the lowercase format and tables could not be deleted if have uppercase letters in it. It is fixed now. If database table has 'dbTableWithSomeData' name, you will see it as 'dbTableWithSomeData', not as 'dbtablewithsomedata'. Thanks to Deirdre who found this bug.


  • 27.09.2010
  • Technical update for WordPress 3.0 full compatibility. Staff deprecated since WordPress v.3.0 is excluded.
  • Italian translation update. Thanks to Alessandro Mariani.


  • 07.07.2010
  • options form layout problem is fixed. That was wrong pgc-admin.css file version issue.


  • 01.07.2010
  • You can mark tables which you do not wish to see as scan results as hidden.
  • You can search extra columns in the core WordPress tables, which could be added by plugins.
  • Czech translation is added


  • 25.05.2010
  • Dutch translation is updated.


  • 18.05.2010
  • Italian translation is updated


  • 14.05.2010
  • German translation is updated


  • 12.05.2010
  • Italian translation is added
  • Lost translation domain inserted into a few places in the source code. Translators are welcome to update their work :).


  • 03.05.2010
  • "Delete Tables" button is added
  • General code cleanup


  • 02.05.2010
  • German, Japanese translations are added
  • Another text domain 'pgc' missing bug is fixed


  • 01.05.2010
  • French, Indonesian, Spanish translations are added
  • Text domain 'pgc' missing bug is fixed


  • 29.04.2010
  • 1st pre-release.


Coming soon. Just ask it. I will search the answer.


I am ready to answer on your questions about this plugin usage and help with possible problems. Use Plugins Garbage Collector plugin forum or this page comments and site contact form for that please.


Tags: ,

  • Pingback: Top 10 WordPress Plugins to Spring Clean Your Blog()

  • Pingback: Free and Premium WordPress Plugins - Top WP Plugins |()

  • Pingback: How to Build Your Own Small Business Website in a Weekend | Small Business Marketing, Trunch, North Walsham, Norfolk.()

  • Pingback: Web Marketing - Top Free and Premium WordPress Plugins()

  • Pingback: SEO – Optimierung für WordPress Blogs | SEO Optimizer Blog()

  • Vladimir Garagulya

    Yes, you defined the problem correctly. Edit path to ‘wp-config.php’ in the ‘pgc-ajax.php’ to fix it. You can input full absolute path, or try this ‘../../../../wp-config.php’ there.

  • Yuri

    hi Vladimir
    i just installed the plugin and hit the “delete tables” button for the statpress plugin table.  Is this action exactly the same as if i went into myphpadmin, selected “wp_statpress” and then clicked on “drop”?  Or is it a different action in some/any way?

    Also, with your plugin it seems i can only delete the tables of deleted plugins.  Can i delete the table of an active or disabled plugin?   Or is there a reason i should not do that?

    I have the mbp-ping-optimizer plugin (disabled) which has a large table size (nearly 1 gig).  How can i get rid of this table?  Do i have to delete the plugin and then delete the table, and then re-install the plugin if i want to use it again?

    Or would you recommend “dropping” the table in myphpadmin and then enable the plugin again if i want to use it again?

    thanks for your help

  • Vladimir Garagulya

    Hi Yuri,

    >>Is this action exactly the same as if i went into myphpadmin, selected “wp_statpress” and then clicked on “drop”?
    Yes, this action is exactly the same. I execute ‘drop table “table_name”‘ command for selected table in this case.

    >> Can i delete the table of an active or disabled plugin?
    Deleting table of an active plugin will most probably lead to the PHP error and blog misfunction.
    I don’t allow to delete tables of disabled plugin as sometime it could be deactivated temporaly (for buggish plugin isolation fro example). In this case user can delete table just by mistake.
    So yes, you should deleted plugin first in order to get ability to delete its tables with help of PGC plugin.
    Some good made plugins deletes their tables themselves when you press ‘delete’ link in WordPress plugins panel.

    You may use as PGC as MyPhpAdmin, what’s more convenient for your purposes.

  • Yuri

    Hi Vladimir
    thank you for your response!  I have another question, not exactly related to your plugin but related to MyPhpAdmin, if you would be kind enough to help.

    I have some wp sites that i’ve “let go”. Domain is expired, i’ve deleted the website file in cpanel file manager, and i’ve removed the addon domain.  But when i was MyPhpAdmin,  i noticed the tables are still there for that site.

    Is there any reason i should leave the tables there?

    Or should i delete them?  If so,  after i “check all” do i then apply the “drop” or the “empty” action?  I don’t know what the difference is between “drop” and “empty”

    If “dropping” the table means to delete it,  and “emptying” the table means to keep it but empty it’s contents….  is it safe to “empty” the table on a plugin which is still active?

    thank you

  • Vladimir Garagulya

    If you don’t plan to restore data from the deleted domain sometime somewhere there is no reason to keep those tables in the database. Just drop them. 
    Drop command deletes the table itself – “delete table ‘table_name'” SQL command is executed.
    Empty command deletes all records/data/content from the table – “delete from ‘table_name'” SQL command is executed.
    It’s not safe to delete data from DB table which belongs to active plugin in the most of cases. Plugin could store some critical data there without which it could not work for example.
    So it’s more safe to deactivate plugin and delete its tables, then activate plugin, in order it will be fully re-installed from the scratch. 
    If you are sure that some DB table was empty after the plugin activation you can empty it without plugin work break, of course.

  • kent T

    hi, good day!

    I installed your plugin but it seems it doesn’t work. 

    It just stays on Plugins Garbage Collector page with the circling loading icon, but it doesn’t seem to work. I left it for 5 hours and when i get back it is still circling circling circling.

    Any advice? By the way i’m on wordpress 3.3

  • Anonymous

    @Kent T I also have WP 3.3 running and Garbage Collector is working fine on at least two different websites.

  • Vladimir Garagulya

    Thanks for sharing this information.

  • Vladimir Garagulya

    Hi Kent!

    As one of the reasons: if you have a lot of plugins installed, script could be interrupted by PHP execution time limit of your server. So, please answer how much plugins you have of your blog, including deactivated plugins?Is it possible to activate temporally DEBUG option in wp-config.php and execute PGC check again? May be you get some error message then, which could help to identify problem.

  • cd_user

    I’ve installed PGC on 2 separate websites recently, both running WP 3.3.1.  Both time PGC has shown 1 table in my database that I could delete.  (I know there’s others) 

    Is this plugin compatible with WP 3.3.1?

  • Vladimir Garagulya

    Yes, it works fine with WP 3.3.1 on my own sites.

  • rrhobbs

    I use a custom table prefix for security reasons and the plugin cannot seem to get past that? thx

  • Vladimir Garagulya

    It should. What it doesn’t recognize correctly now – situation when you have more than one WordPress DB instances with different DB prefixes at the same MySQL database simulteneously. Is it your situation?
    Does plugin show as a garbage some tables from WordPress core list for your active WP database or for other blog at the same MySQL DB?

    P.S. I’m at the holiday’s trip. So may answer with some delays.

  • rrhobbs

    beyond activating sucessfully, the plugin doesnt currently work for me at all. It crashes using all settings. I use the same prefix across the entire db. WP 3.41, garden variety apache cpanel shared hosting. thx

  • rrhobbs

    The *database* prefix (assigned by by host / cpanel / fantastico – my server username on the shared hosting server…) which I cannot change unless I do a custom WP Install and create the database myself…
    is one name; my *table* prefixes, as I mentioned before have been customized for security reasons

  • Alex

    Hi, I’m not sure if you’re still online on this thing but I’ve downloaded your latest version of this plug-in and it doesn’t seem to be working. I’ve clicked on scan and it doesn’t seem to be doing anything; that “busy” circle keeps going on on and on and on long before I click scan anyway.

    P.S. I have read the previous entry regarding this program and activating debugging mode didn’t work either.

  • Vladimir Garagulya

    Hello Alex,

    Are you agree to try version with additional debug output inserted in order to isolate the problem?

  • Alex

    Sure. Where can I find it? Or what can I do in order to make your plug in work properly?

  • Vladimir Garagulya

    I suppose that plugin has some problem with AJAX at your site. Let’s try to check. Download file pgc-ajax.php with debug output from this link
    unpack and put it into plugin directory. Try to press ‘Scan’ button. Do you see ‘debug step 1′ output?
    If you don’t, let me know. If Yes, try to change constant definition at line 8 of pgc-ajax.php
    define(‘PGC_DEBUG_STEP’, 1);
    define(‘PGC_DEBUG_STEP’, 2);
    and try to scan again.
    If you see ‘debug step 2′ continue to steps 3,4,5 and let me know about results.
    Thanks for your help.

  • Alex

    I’ve sent you an e-mail.

  • Vladimir Garagulya

    OK. Let’s proceed via e-mail.

  • Per

    I’m using Wordfence plugin (activated) and can you check why this plugins db turn up as red in your scan?

  • Vladimir Garagulya

    Thanks for your help in bugs hunting. Please try the updated 0.9.11 version.

  • Per


    Works fine but I discovered 1 more plugin with same issue: DRP WordPress User Management

  • Per

    Have you had any chance to look into the issue with DRP WordPress User Management?

  • Vladimir Garagulya

    I find db table name at plugin code this way:

    get non-WordPress table name from your database, exclude configurable WordPress db-prefix, e.g. ‘wp_’ from it, then make text search through all plugin source code php-files.

    DRP WPUM plugin split its own db table names into 2 parts: its own db-prefix, which consists of WordPress db-prefix and ‘wpum’ constant, and the rest part of table name. Look on the sourse code from DRP WPUM:

    $this->_db_prefix = $wpdb->prefix.’wpum_'; // result is ‘wp_wpum’

    $sql = “CREATE TABLE “.$this->_db_prefix.”banned_ips (

    Thus I don’t see the universal way to define that ‘wpum_banned_ips’ db table belongs to DRP WPUM plugin, as plugin author doesn’t use ‘wpum_banned_ips’ string constant directly in his code.

  • Per

    Ok I understand. But can an other solutions be if your plugin allow us user to decide which plugin this redmarked table belongs to or as it works now the delete options?

  • Vladimir Garagulya

    Brilliant idea! I will definitely add this feature – plugin will use expert help from user. User will have variant for table from unknown plugin to decide himself, which installed plugin such db table could belong to and exclude it that way from the “red list”.

  • Per Söderman

    Looking forward to next release if this option can be available there… :-). If you need some pre-test just contact me and I can help you if needed.

  • Bob

    I downloaded Plugins Garbage Collector and ran a Search none-WP tables scan. I deleted the red items. Then I re-ran another scan..and all the same red items showed up again…as if they have not been deleted. Is this normal? How do I know your plugin is working correctly?

  • Vladimir Garagulya

    No, it is not normal. Did you see the notice like this ‘Tables are deleted successfully: ‘ after you press ‘Delete Tables’ button? Plugin should delete selected table in red really. It seems that some error occur in your case.

  • vajrasar

    what if I accidently clicked a green row? I did and it disappeared, was it deleted?

  • Vladimir Garagulya

    No, you just move that table to hidden mode. Turn on ‘show hidden tables’ checkbox and rescan again. You should see that disappeared table.

  • Victory

    hi! I downloaded Plugins Garbage Collector and pressed the button “scan”, but received the following answer “error – not found”

    could you help me please?

  • Vladimir Garagulya

    Show the screenshot with error message please.

  • lilo

    Hi, I just installed your plugin and scanned my database, mainly becuase statpress is taking huge amounts of my capacity, eventhough I deleted it 2 month ago. Now the result of the scan sais, that statpress is active and i cannot delete the tables. Do you have some advice, what i could do?

  • grigione

    Plugin don’t really clean all plugin uninstalled

    I have unistalled plugin Ether Content Builder WordPress Plugin but in
    my pages editor i have some custom fields values that ether plugin have

    So i have tried to delete them by your plugin but it can’t find them in database

  • grafcom

    Hello, please see the support section

    I tried to install the plugin and activate and it would not activate as it gives a fatal error. All other plugins deactivated but no luck.
    Different themes also no luck.
    PHP version 5.5
    WP version 4.0.1

  • Vladimir Garagulya

    Show PHP fatal error message please.
    Set WP_DEBUG to true at wp-config.php to see more details if needed.

  • Vladimir Garagulya

    This bug was fixed with version 0.9.15 release.

  • merismos

    I removed all the plugins on my wordpress site (deactivated, deleted) and only left PGC active…Still get the never ending spinnign circle…tried the suggestions shown here and none of them fixed it.
    I am using Version 4.0.

  • Vladimir Garagulya

    Please check browser JavaScript console. Are there any JavaScript errors? Try to set WP_DEBUG constant at wp-config.php to 1. May be WordPress will show PHP error message then, if it takes place.


    wp last version Error: Empty answer is received

  • Vladimir Garagulya

    After what action you get this error?