Operating a WooCommerce store, one has to stay vigilant. From what’s trending to what’s selling, the upcoming season to the festive offers, one must be aware of everything in order to keep the store updated and have products that are more likely to be sold.
Now with addition comes deletion. Meaning that if you add seasonal products or the ones that are not sold for a time being, they must be removed, right?
This is where you would need to access the WooCommerce delete all products feature.
Whether you want to bulk delete all WooCommerce products or delete products based on filters, this article will surely make your job easier.
Why do you need to delete products from the WooCommerce store?
Before getting into the depth of deleting products using default WooCommerce, we would first highlight why you would need to delete products from your WooCommerce store.
There are multiple situations when you would need to bulk delete WooCommerce products. The top five reasons are mentioned below.
1. Seasonal products
When you have added products that were relevant only for a specific time period. Say it was the Football World Cup and products added were all related to the event. After the event, the sale of such products would fall and a time would come when they are totally out of trend. So, there arises the need to bulk delete these products.
2. Cyclic products
In some cases, inventory gets replenished with new products at regular intervals. Like new clothes for every major season as in the case of Zara brand.
So what happens to old stock? Delete them so that they are not available henceforth.
3. Out of stock products
For products that are out of stock and there isn’t any likelihood of the same returning in stock, it is best to have them removed from the store. There isn’t any point in having products that are not to be sold or out of stock.
4. Non-selling products
What’s not selling, better to get rid of them than accumulating dust and costs for these unsold inventory.
5. Test products
Before launching the main product, you create some test products to check all is well. So when the final product is launched, remove the test products.
How to delete products using default WooCommerce?
There are three solutions or ways using which you can delete all products in WooCommerce. For people wondering how to delete WooCommerce products all at once, here is the step-by-step guide for you.
1. Using default WooCommerce – Suitable for less products
Considering that the number of products to be deleted from the store is less than a few hundred, the WooCommerce delete all products task can be executed from the product page itself.
- Go to WooCommerce > Products
- Choose the Screen Options to increase the products to be displayed.
- Select products one-by-one. Or apply filters based on category, stock status, product type.
- 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 them from the Trash.
2. Running an SQL Command – For more products but required coding
Another approach to delete bulk products from WooCommerce is by running the SQL command.
- Log in to the phpMyAdmin portal
- Select the database that has all the products to be deleted. Make sure, that you backup your database before executing the SQL statement!
- Than select table “wp_posts” (if you have wp prefix) 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 bulk delete products.
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 using Smart Manager plugin to delete all products or delete products using advanced filters in WooCommerce.
3. 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.
Not just products, you can also bulk edit your orders, coupons, blog posts, pages, users…any WordPress post type. There are separate tabs 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.
Though the plugin supports the WooCommerce delete all products feature in the Lite version, you can only move them to trash and only upto 50 records 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.
Here’s how Smart Manager makes WooCommerce delete products or post types super easy and quick
Delete all products / bulk delete products
As shown in the figure above,
- Go to Smart Manager, select Products as post type from the drop-down.
- Tick the checkbox. This will select all the products. Click on it or select only those products you want to delete.
- Click the Delete icon. It will show two options – Move to Trash and Delete Permanently. Choose your desired option.
That’s it. So whenever you are sure that all the products that are displayed needs to be removed, follow the above steps.
Bulk delete products based on filters
Select the products from the list. Or use the search bar to filter out specific products. Select them and then click on Delete. This will delete the selected products from the list.
Apply filters and delete test products, non-selling products…
The plugin has advanced search features that allow you to filter products based on your needs. The AND, OR operations allow you to search for any product and delete them in a click.
For example, you want to delete all products having price below $10. Apply filter, select products and delete them.
Delete based on categories and attributes
Select products based on a certain category and attribute. Say delete all t-shirts that are yellow in color. Filter them based on the conditions and apply the delete option. Similarly, you can use the plugin to delete categories and attributes from the list as well.
Select any row or rows and delete products directly by clicking on the Delete option. Very convenient to delete less number of products quickly.
Delete products using date filters
This is useful when you want to delete seasonal products as mentioned. Apply the date range in Smart Manager, it will fetch you the products for that date range. Select the ones that are not required 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?
Scrapping all of the products that are no longer sellable or unwanted is essential to keep the store updated and avoid costs.
Whether you have just started or have been running a store for years, you will always feel better when using Smart Manager to delete WooCommerce products.