Learn how to bulk delete out-of-stock WooCommerce products filtered by category, keyword, date, etc.
Sometimes stores have products in just for a season, or they stop selling them after the products run out of stock.
So when that happens, maybe you’ll need to delete those out-of-stock products from your WooCommerce store.
But, how do you delete all out-of-stock T-Shirts?
How do you remove all out-of-stock green jeans?
What do you do to delete all sold-out products that contain a specific tag?
In this article, we’ll show you how to filter and delete thousands of out-of-stock products with just a few clicks.
This works on all servers, even cheap servers. It won’t slow down your site.
1. Install the WP Sheet Editor – WooCommerce Products plugin
WP Sheet Editor provides a Products Spreadsheet where you can see all the product information, and you can edit freely.
You can skip this step if you already have the plugin installed and activated.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features
Once you open the plugin, you’ll find all your products along with their detailed information.
2. Search for out of stock products
After the plugin is open, you can start looking for your out-of-stock products.
For this, you’ll use the Search tool, which allows you to filter your WooCommerce products by any parameter.
Once the tool is open, you can search for the products by specific parameters or even combine, as we show you below:
Search option 1 – Find all out-of-stock products
To look for the out-of-stock products and remove them all, we’ll enter these values:
- Enable advanced filters: Check it
- Field key: Stock status (_stock_status)
- Operator: =
- Value: Select the option Out of stock
- Click on Run search
Once all the products were filtered by the stock status “out of stock” the results will be shown in the spreadsheet.
Search option 2 – Filter out-of-stock products by keyword
When you need to filter all sold out products containing a certain keyword, you should use the following fields:
- Contains keyword – Enter the product keyword.
- Enable advanced filters – Tick this checkbox and use these values:
- Field key: Stock status
- Operator: =
- Value: Select the option Out of stock
- Click on Run search.
After the products have been filtered, you’ll see them displayed in the spreadsheet.
Search option 3 – Find the out-of-stock products by taxonomy
If you don’t want to remove all out-of-stock products, but just all that belong to the same category, attribute, or tag, you’ll need to enter the following values into the Search tool:
- Enter tags – Enter product categories, attributes, or tags in this field. It works for the three of them.
- Enable advanced filters – Tick this checkbox and use these values:
- Field key: Stock status
- Operator: =
- Value: Select the option Out of stock
- Click on Run search.
As you can see in the screenshot below, all the products are filtered successfully.
Search option 4 – Search for out-of-stock products by date range
Let’s say you want to delete only out-of-stock products that were created in a specific date range.
To do this, you must enter the following data:
- Enable advanced filters – Tick this checkbox and use these values:
- Field key: Stock status
- Operator: =
- Value: Select the option Out of stock
- Enter the dates in the Date range from and to fields
- Click on Run search.
As you can see, all products were successfully filtered.
Search option 5 – Look for variable products out of stock
To delete the variations that are out of stock, the values to filter them are as follows:
- Enable the Search on variations?
- Enable advanced filters
- Field key: Stock status
- Operator: =
- Value: Select the option Out of stock
- Click on Run search.
As you can see, all out-of-stock variable products were filtered out with no problem.
3. Bulk delete the out of stock products
After filtering the products, you need to pen the Bulk edit tool, which helps you apply changes to thousands of products at once, so open it by clicking it in the spreadsheet.
Once the tool is open, enter the following values:
- Select the rows that you want to update: Edit all rows from my current search
- What field do you want to update: Status
- Select type of edit: Set value
- Replace existing value with this value: Delete completely
- If you are deleting parent products: Edit only parent products
- If you are deleting product variations: Edit only variations
- Click on Execute now
IMPORTANT. You can select Trash or Delete completely.
If you’re interested in changing the stock status instead of deleting the products, you can check this tutorial.
As you can see, deleting out-of-stock WooCommerce products is easy with WP Sheet Editor, so don’t lose time and start using it.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features