Delete plugin data after removing from Wordpress

20,144

Solution 1

There are two things to understand when uninstalling WooCommerce.

1) If you deactivate and delete the plugin from the WordPress Admin, you are deleting WooCommerce settings and database tables, and trashing the pages created when first installed.

2) If you need to remove ALL WooCommerce data, including products, order data, etc., go to: WooCommerce > System Status > Tools, and enable the Remove post types on uninstall. Doing this deletes all WooCommerce data when you deactivate and delete the plugin from the WordPress Admin.

Solution 2

Normally we have a button "delete plugin data" it appears at the time of deletion. but if a plugin haven't give that option then you can't do that except go to the phpmyadmin and delete plugin tables manually.

Solution 3

Unfortunately, if a plugin doesn't delete it's data for you, then you will need to do it manually.

This is going to differ from plugin to plugin, so the best way to do this is to open the plugin files yourself in a code editor, and search for their database queries. They will (hopefully and most likely) be using calls to $wpdb every time they add custom data, but they may also be using functions like set_option() and update_option() when adding more simple options data to the DB.

If you can find and make a note of what they're doing in each database call, you can then go into a tool such as phpMyAdmin (provided already by many hosts, but you can install it yourself if it's not), and delete from the database each custom table and option you found the plugin created (options will be in the wp_options table).

Always take a backup of your database before you do this. You can do a database export from within phpMyAdmin, and if anything goes wrong you can do a re-import in there too.

If you found and removed everything successfully then you should find that when you reinstall the plugin, all it's settings start from scratch again.

I'd also suggest posting on the plugin's official support forum at wordpress.org and suggesting that they incorporate data removal into the plugin. Many plugins don't, and it can be frustrating!

Solution 4

For deleting a plugin you have to do these things.

1.Delete it from dashboard.

2.Access your Wordpress files using FTP then go to plugin folder and delete the relevant plugin folder.

3.Now delete it from Database. Open Mysql and delete plugin table if it is not there then delete it from wp_options.

That's it.

Share:
20,144
Sonia Khan
Author by

Sonia Khan

Updated on February 04, 2021

Comments

  • Sonia Khan
    Sonia Khan over 3 years

    I am using a WooCommerce plugin (WooCommerce Currency Switcher) that I want to delete completely and then reinstall. When I install the plugin again, it remembers all of its previous settings.

    How can I delete all of a plugin's data, even after completely removing it from WordPress?

    I've searched and learned that some plugins will not delete their data from the database themselves. Is there a plugin available that will remove the data of deleted plugins?

    • Tim Malone
      Tim Malone almost 8 years
      How did you go with this @Sonia?
  • Sonia Khan
    Sonia Khan about 8 years
    i am not deleting WooCommerce , i want to delete link plugin
  • Sonia Khan
    Sonia Khan about 8 years
    is there any way to find out what tables is in use of that plugin link
  • Tim Malone
    Tim Malone about 8 years
    I've filed a suggested edit on the question, partly to make this clearer. At first it was easy to read that it was about WooCommerce itself.
  • Umer Shoukat
    Umer Shoukat about 8 years
    yes you can find those tables in wp_options table.. normally table names are related to plugin name with their filed name for example. "jetpack_social" that can be the name of social option in jetpack plugin. hope it'll be helpful.