Posted on

How to Remove or Delete All Products in WooCommerce

Here's how to delete all products in WooCommerce quickly, safely, and with code. Also discover how to delete all products in bulk based on attributes, categories, etc.

WooCommerce Delete All Products

Last updated on July 6, 2024

Running a WooCommerce store requires constant vigilance. To stay competitive, you must keep track of trends, best-sellers, upcoming seasons and festive offers, ensuring your store is always up-to-date with products that are in demand.

Adding new products often means removing others. Seasonal items or products that aren’t selling well need to be cleared out to make room for fresh inventory.

This is where the WooCommerce delete all products feature comes in handy.

Whether you want to remove or delete all products or delete specific products based on filters, this article will make your job easier.

Why to delete products from your WooCommerce store

Before diving into the methods of deleting products, let’s first explore why you might need to remove products from your store. This can be a permanent delete or a temporary one (Move to Trash).

Here are the top five scenarios where you need to bulk delete WooCommerce products:

Seasonal products
Seasonal products are relevant only for a specific period. For example, items related to the Football World Cup or Olympics might be popular during the event but lose appeal afterward.

To maintain a fresh and relevant inventory, these products should be bulk deleted once they are out of trend.

Cyclic products
Some stores regularly update their inventory with new products, such as clothing for each season, similar to brands like Zara. To make room for new stock, old items should be removed to avoid clutter and keep the store updated.

Out of stock products
If products are out of stock with no plans for restocking, it’s best to remove them from your store. Keeping unavailable products can mislead customers and clutter your inventory.

Non-selling products
Products that don’t sell but only accumulate dust and costs should be removed to free up space and reduce unnecessary costs. It’s more efficient to focus on items that generate revenue rather than holding onto unsellable stock.

Test products
Before launching new products, you might create test products to ensure everything works correctly. Once the final products are launched, these test items should be deleted to keep your inventory clean and organized.

Three ways to remove or delete all products/specific products in WooCommerce

  1. Default WooCommerce
  2. SQL command
  3. Smart Manager plugin

Let’s explore each of them and see how to delete products in WooCommerce with each of these three ways.

Using the default WooCommerce way – Suitable for less products

Given that the number of products to be deleted from the store is fewer than a thirty to fifty, the task of deleting all products can be performed directly from the default WooCommerce Products dashboard.

Delete products using core WooCommerce
  1. Go to your WordPress admin. Click on WooCommerce > Products.
  2. Choose the Screen Options to increase the number of products to be displayed.
  3. Select products one-by-one or apply filters based on category stock status and product type.
  4. Click on Bulk Actions and select Move to Trash.

This process is very slow and tedious. If you don’t limit the number of products per page to 100 or less, it will take a lot of time.

To permanently delete these products, you need to then delete those products from the Trash.

Running an SQL Command – For more products but requires coding

The second approach to delete all products from WooCommerce is by running the SQL command.

  1. Log in to the phpMyAdmin portal.
  2. Select the database that has all the products to be deleted. Make sure that you backup your database before executing the SQL statement!
  3. Select table {prefix}_posts and run the SQL statement as shown.
DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE 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');

After executing this SQL statement, verify if your products are deleted.

However, this is not the best way to delete products in bulk.

At times the total amount of products to be deleted ranges in thousands and using the above processes would consume a lot of time. Also, running SQL queries for complicated cases isn’t everyone’s cup of tea, because you may lose significant data if it went wrong.

This is why we recommend the third option below – using Smart Manager plugin to delete all products or delete specific products using advanced filters in WooCommerce.

Using Smart Manager – For any number of products, done quickly and without coding

Smart Manager is a powerful plugin that gives you the ease to make the most out of your WooCommerce store using an Excel-like spreadsheet.

From managing products to bulk editing them – add / delete / update, you can use Smart Manager plugin for all.

Smart Manager products dashboard

Not just products, you can also bulk edit your orders, coupons, blog posts, pages, users…any WordPress post type. There are separate dashboards for post type which can be used to filter details and delete them on the go. You can rest assured that the plugin would clear unwanted data with ease.

Here are the steps to delete products:

  1. Download, install and activate Smart Manager plugin like you do for any WordPress plugin.
  2. Go to WordPress admin. Click on Smart Manager and select Products from the dropdown in case other dashboard is shown.
  3. Tick the header checkbox to select all the products. Or select only those products you want to delete. Use advanced search to find your desired products quickly.
  4. Click the Delete icon. It will show two options – Move to Trash and Delete Permanently. Choose your desired option.
woocommerce delete all products option

That’s it. So whenever you are sure that all the products that are displayed need to be removed, follow the above steps.

Note – If you click on ‘Move to Trash’, Smart Manager will move the selected records to trash which you can restore later if required. If you choose ‘Delete Permanently’, Smart Manager will delete the records permanently and you would not be able to restore the same back.

Though the plugin supports the WooCommerce delete all products feature in the free version, you can only move them to trash and delete upto 50 records only at a time.

So, if you also want the permanent delete functionality using advanced search filters and bulk edit functionality, purchasing the Pro version is the best way to update your store database.

You also get export, bulk edit and other features for products and manage orders, coupons, users, any WordPress post type, taxonomies and custom fields in the Pro version.

How to delete products with advanced conditions using Smart Manager?

Smart Manager provides full flexibility to delete products based on categories, attributes and more.

Bulk delete products based on filters

Select the desired products from the list, or use the search bar to filter specific products. Once filtered, select the products and click ‘Delete’ to remove them from the list.

Delete test products, non-selling products…

Smart Manager offers advanced search features to streamline the deletion of unwanted products. Using AND-OR operations, you can filter products precisely and delete them with a single click.

For example, to remove products priced below $10 or having the name ‘Test’, simply apply the filter, select the products and delete them.

Delete based on categories and attributes

Select products based on a certain category and attribute. For instance, delete all yellow-colored T-shirts. Set the filter and apply the delete option. Similarly, you can use the plugin to delete categories and attributes from the list as well.

Delete products using Inline edit

Select any row or multiple rows and delete products directly by clicking on the Delete option. This is very convenient to delete fewer products quickly.

Delete products using date filters

Useful when you want to delete seasonal products as mentioned. Apply the date range in advanced search. It will fetch you the required products for that date range. Select them and click on Delete.

Note – Deleting the products would also not show the same product name in any of its existing orders or subscriptions.

Delete only specific product variations

Smart Manager lists each product variation in a separate row. This means that if you want to delete only X out of Y variations for a particular product, select only those product variants and delete them.

Delete featured images, media library images

This is yet another advantage of using Smart Manager. Instead of going through each product and post, select ‘Attachment’ as the post type from the drop-down. Select all images you want to remove and click on the Delete icon.

Sounds exciting right?

Try the live demo

How to remove the same products with duplicate descriptions?

Smart Manager allows you to delete products having the same descriptions. You may find yourself with hundreds of products with duplicate descriptions while creating test products or when you are importing them, and you want to get rid of them after you have added the products up.

  1. Toggle on the Advanced Search.
  2. Select Description from the first drop down, select is from the second drop down and enter or copy the description.
  3. Search filter for products based on description
  4. Smart Manager will fetch your required results. The search result will also include the main product which the Admin would not like to be deleted. So select the products carefully.
  5. Click on the Delete button, choose to delete the products permanently or move them to trash.

Smart Manager also gives you the flexibility to delete duplicate products based on title, stock status, product category, SKU, tags and other product fields, including custom ones.

Conclusion

Scrapping all of the products that are no longer sellable or unwanted is essential to keep the store updated and avoid costs.

So whether you have just started or have been running a store for years, whether you have hundreds or thousands of products, Smart Manager is the most convenient solution to delete WooCommerce products. Super-easy and super-quick!

Get Smart Manager plugin now

FAQ

How do I mass delete products in WooCommerce?

  • Go to WordPress Admin > Smart Manager and select Products dashboard from the drop-down.
  • Tick the header checkbox to select all the products. Or select only those products you want to delete.
  • Click the Delete button. You can move them to Trash or delete them permanently.

How do I add and remove products in WooCommerce?
You can add new products directly to your WooCommerce store using Smart Manager’s sheet editor. Refer to this doc.

How do I delete multiple variations in WordPress?
Select all the desired variations using Smart Manager advanced search sheet and delete them.

Can we permanently delete WooCommerce products with one click?
Yes.

One thought on “How to Remove or Delete All Products in WooCommerce

  1. Thanks a lot works great!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.