reset and delete woocommerce data

How to Reset Woocommerce data after uninstall

So, You want to reset and delete WooCommerce data?

You probably tried to do it by manually deleteing products, orders and everything else page by page.

The only problem is deleteing everything manually is a bloody time-consuming process and you might end up wasting hours.

And, after uninstalling the plugin from WordPress directory and, deleting the WooCommerce plugin from WordPress as you do with any other plugin, you only remove the plugin and its files.

Your settings, orders, products, pages, etc… will still exist in the database.

In this tutorial, I will show you how to just do that in under 2 minutes.

delete woocommerce data completely

If you need to remove ALL WooCommerce data, including products, order history, reports, etc., you need to be able to modify the site’s wp-config.php file to set a constant as true.

To do that you need to add the following code snippet to your site’s wp-config.php file.

define('WC_REMOVE_ALL_DATA', true);

Please make sure add the above snippet on its own line above the /* That’s all, stop editing! Happy blogging. */ line.

After this, you can simply deactivate and delete the plugin and once you remove the WooComerce plugin from your website it will reset and delete WooCommerce related tables from your database which means it will delete all the products, orders history, woocommerce related pages and pretty much everything else.

2 Comments

  1. I originally wanted to create an e-commerce site with woocommerce but later turned my site into a blog.

    I want to delete WooCommerce but want to keep some of the product-category pages and some of the product pages because they get visitors and 301 redirect them for SEO to new pages I will create.

    But there are thousands of product pages, brand, ean, publisher, upclist, eanlist, model, mpn, size, partnumber, itemdimensions, label, mpn, packagedimensions, publisher, studio, color, label, manufacturer, Department, feed – 23,000 pages! How do I get rid of these pages while keeping some product category and product pages?

    Thanks

Leave a Reply