How to Delete All Products From WooCommerce (3 Ways) - TIPsoont

How to Delete All Products From WooCommerce (3 Ways)

How to delete All products from Woo commerce

Running an online store means you need to keep your site upgraded. For example, removal of any seasonal or out-of-stock product to replace with a new one. In this regard, you only need to delete all products from WooCommerce. 

There can be several other reasons, but how you do so is a question of many. 

Don’t worry; you can quickly delete all products from WooCommerce using the WooCommerce dashboard. However, this method is not suitable for an extensive number of products. That’s why you may need to run a code to delete products from WooCommerce in bulk. Meanwhile, a few plugins are also available to let you repeat the same process but with more straightforward navigation and hassle-free.

Want to know how you can follow these processes?

Let’s find out the step-by-step process together. 

Ways to Delete All Products From WooCommerce:

Whether you want to delete all products from WooCommerce at once or delete a few based on the filters, this article will serve you in many ways.

However, you must be assured that once the product gets deleted, you won’t be able to restore them, That’s why we highly encourage you to create a backup of your site before you dig into the process.  

Using WooCommerce Settings:

The easiest way to delete all products from WooCommerce is to use the default settings or product page of WooCommerce itself. However, the only drawback of using this method is that you cannot remove products in bulk. 

For example, it is an ideally suitable method for a store with less than 100 products.

To do so, all you need is;

  1. Login to your WordPress dashboard and get access to the WooCommerce products sections (WooCommerce > products).
  2. From the top right corner of the product page, you must select “screen options” and increase the number of products appearing on one page to a maximum of 100 to 200. This will help you to speed up the deletion process.
  3. Next, select the products individually or use the filters to categorize the products. For example, you can filter products based on the type, inventory, or status.
  4. Once you select the products, you only need to find a drop-down menu, “bulk options,” appearing on the left side.
  5. Here you need to select Move to Trash from the drop-down menu to delete all the products from WooCommerce simultaneously. 

That’s it! 

Now, you have removed the products from the site. However, they are just being processed to the trash section and will remain visible to you, where you can quickly restore them. Whether you want to restore the deleted post, page, or product from WordPress, you only need to go to the trash and take the necessary actions. 

So, to permanently delete the products, go to the trash section and delete it from there. 

By Running an SQL Code:

Well, the above-mentioned method will let you delete the products from WooCommer at once and effortlessly. However, it is not a suitable choice for larger stores or where you have products in bulk.

So, another way to make it happen is by running an SQL command which ultimately requires a site backup before you proceed. 

All you need is;

  1. Get access to the Cpanel and go to the PhpMyAdmin portal to initiate the process.
  2. Next, go to the SQL tab from the top and run the command shown below.
  3. After pasting the code, you must hit the “go” button to start the process.
  4. That’s it; now check your site to see whether the products have been deleted after running the SQL command.

Remember Creating a Backup is a Must Before Proceeding with this Method.

DELETE relations.*, taxes.*, terms.*FROM wp_term_relationships AS relationsINNER JOIN wp_term_taxonomy AS taxesON relations.term_taxonomy_id=taxes.term_taxonomy_idINNER JOIN wp_terms AS termsON taxes.term_id=terms.term_idWHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'));DELETE FROM wp_posts WHERE post_type IN ('product','product_variation');

Use Smart Manager:

Do you know running SQL queries will consume lots of time and is risky, especially if you are not a coding person?

Furthermore, the risk of losing data is always there. 

That’s why another approach to deleting all products from WooCommerce is using the Smart Manager plugin.

It is a powerful plugin that gives you a bulk of customization opportunities. Smart Manager serves you in many ways, whether you want to delete, edit, or update the products in bulk. You can quickly delete 50 entries at a time using its lite version.

Furthermore, Smart Manager is the most convenient plugin that presents the data in a spreadsheet or table editor format to let you quickly access the data. 

  1. Login to the WordPress dashboard to install and activate the plugin.
  2. Find the option “smart manager” from the left side menu and get access to it.
  3. Now select the products option from the top and select the products you want to delete. 
  4. After that, click the delete icon and choose between move to trash and delete permanently. 

However, this plugin has both pro and free versions, where using a nulled plugin is highly discouraged, and you must not do so. The basic version is free for all, whereas the pro version costs $149 per year and $479 for a lifetime subscription. 

The Bottom Line:

There can be several reasons for which you may wish to delete all products from WooCommerce. 

For example, you may have a seasonal product, and after ending that season, you just need to delete it from the site. With that, out-of-stock, non-selling, test, or cycling products may need to be replaced. 

So, any of these concern leads to deleting products from WooCommerce. In this regard, we have mentioned the top 3 methods to achieve without hassle if you use a popular CMS WordPress. 

If you have any more queries, write in the comment section; we would love to be there.

Till Next!

Admin
Social Media

YOU MAY ALSO LIKE

Leave a Reply

Your email address will not be published. Required fields are marked *