Delete plugin data after removing from WordPress

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?

Read More

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?

Related posts

4 comments

  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.

  2. 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!

  3. 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.

  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.

Comments are closed.