What I really mean to say is - does deleting a WordPress Plugin leave remnants in the WP database?

The reason I ask is because I've installed and uninstalled a bunch of Plugins over the years and am curious if there is cluttered database/ SQL code/ tables lurking around?


Deleting a plugin deletes all its code, but doesn't necessarily delete data it's added to the database, or additional tables it may have created. Whether a plugin can or does delete its own data depends entirely on the plugin.

In my experience, the vast majority do not, and those that do usually have a setting along the lines if "Delete data on uninstall" that would need to be checked first.

There actually really isn't a simple way to find this data yourself. In terms of finding additional tables, you can cross reference this list of core WordPress tables with what you have. Any additional tables would be added by plugins. There's no precise way to tell which plugins created which tables, you'd just need to look at the name and infer it. Most will prefix with something unique. WooCommerce tables include woocommerce_, for example. But as with other plugins, WooCommerce also adds data to core WordPress tables, like posts, meta and options.

There are plugins out there that claim to help with this, but I haven't tried any myself. From what I've seen many will require you to confirm if something is actually unused, because there really isn't any clean way for a user or other plugin to tell where the data came from.

  • Where do we look to find remaining data in the tables? Is it good 'hygiene' to remove all tables that are not doing anything and have old Plugin Data? – henry Aug 8 '17 at 14:04
  • My response comment was getting too long, so I just updated my answer. – Jacob Peattie Aug 8 '17 at 14:11
  • Thanks for the comprehensive answer. I guess you can always give yourself a fresh WP install....hmmm actually that would still copy over the old data. Seems odd that there isn't a way to totally remove clutter – henry Aug 8 '17 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.