How to Delete All Products in WooCommerce

Updated: August 27, 2021

Share:

When running an online business, you must not only be aware of what items to offer but also of what products not to sell. For example, if you add seasonal items or those that are no longer in stock, they must be deleted.

This is where you need to use the feature of deleting all WooCommerce products.

This article will give you comprehensive instructions on how to delete all products in WooCommerce.

Let’s get started!

Table of contents

Why Do You Need to Delete Products From Your WooCommerce Store?

There are several scenarios in which you might need to delete all WooCommerce products. Here are the top five causes:

  • Seasonal items

Products that were only appropriate for a limited time. Products will go out of favor beyond that point, and you will need to delete them in bulk.

  • Products with a cyclical nature

Inventory is refreshed with new items at regular periods, such as new clothing for each major season. You must delete the old stock so that it is no longer available.

  • Products that are currently out of stock

Products that are out of stock and have no chance of being restocked should be removed from the store.

  • Non-selling items

Products that aren’t selling, therefore you’d better get rid of them than gathering dust and incurring expenditures for unsold inventory.

  • Products for testing

You develop various test products before launching the main product to ensure everything is in order. When the final product is released, you must also delete the test products.

How to Delete All Products in WooCommerce?

In this part, we will show you how to delete all products from your WooCommerce store in two different ways: using the default WooCommerce setting and running an SQL command.

Method 1: Using the default WooCommerce setting

This method is suitable for deleting less than a few hundred. You can just delete all products from the product page itself.

Using the default WooCommerce setting

Step 1: Go to WooCommerce > Products

From your WordPress admin dashboard, go to WooCommerce > Products.

Step 2: Choose Screen Options

Then you need to select the option Screen Options, which is on the top right of the Products page. Here, you could reduce the number of items per page to 100-200 products per page to speed up the deletion process since more products mean slower loading.

This allows you to increase the number of products that are being displayed.

Step 3: Select products to delete

You must now choose the products that you wish to remove from your WooCommerce store. You can do this one by one or by using filters based on category, stock status, and product type.

Step 4: Select Move to Trash

Now that you have chosen products, navigate to the dropdown list Bulk Actions, click on that, and then choose the option Move to Trash.

This is an extremely slow and laborious procedure. If you don’t cap the number of products on each page to 100 or fewer, it will take quite a long time.

If you want to delete these items for good, you must then go to the Trash and delete them one more time.

Method 2: Running an SQL Command

Step 1: Log in to the phpMyAdmin

Step 2: Select database

Now that you’re on the phpMyAdmin screen, choose the database containing all of the products that you want to delete.

It’s important to keep in mind that you need to make sure you have a backup of your database before running the SQL statement.

You can always search for the table wp options and ensure it has the proper URL for your website to verify you have the correct database loaded.

Step 3: Run the SQL statement

Now click on the SQL tab and you should see a page like this:

Run the SQL statement

After that, simply paste the following code into the MySQL query to start deleting all products in your WooCommerce store.


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');

Then, to officially run the SQL statement above, hit the Go button.

Lastly, you should check whether your products have been deleted or not after running this SQL statement.

It’s worth mentioning that if your database prefix isn’t the default wp_, you’ll need to change it with your actual database prefix.

Also, because the total number of goods to be deleted might often be in the thousands, utilizing the aforementioned methods would take a long time. Furthermore, performing SQL queries for complex instances isn’t for everyone because you risk losing a lot of data if something goes wrong.

Therefore, in the next section, we’ll show you two robust plugins that can help you delete all goods for any number of products quickly, easily, and without coding.

1. Smart Manager

Smart Manager

Smart Manager is a sophisticated plugin that enables you to use an Excel-like spreadsheet to take your WooCommerce business to the next level.

Smart Manager plugin can be used for multiple purposes, from managing products to mass modifying them - adding, deleting, and updating them. Not only can you bulk edit products, but you can also bulk edit orders, coupons, blog articles, pages, and users.

Although the Lite version of the plugin supports the feature of deleting all WooCommerce products, you can only move them to the trash and delete up to 50 entries at a time.

Therefore, purchasing the Pro version is the ideal method if you want to delete products permanently.

Features

Features

  • Spreadsheet / Table Editor
  • Price, Product & Stock Management
  • Quick Inline & Bulk Edit
  • Order Management, Discount Coupons…
  • Admin Columns Freely

Pricing

The basic version is available for free. The Pro version is $149 per year, while the lifetime subscription is $479.

2. Product Import Export Plugin for WooCommerce

Product Import Export Plugin for WooCommerce

With the Product Import Export Plugin for WooCommerce , you can delete hundreds of products from your WooCommerce store using a CSV file while also importing new products.

This plugin also allows you to import product data in XML and CSV formats. It works with the majority of WooCommerce product kinds, as well as a few more complicated ones like Product Bundles.

Features

  • Export to or Import Products from CSV/XML.
  • Scheduled Import or Export using multiple FTP/URL.
  • Compatible with major 3rd-party plugins.
  • Simple Ajax interface and flexible API.
  • Several filter options for custom import/export.
  • Provision for Bulk Edit.

Pricing

The single site, 5 sites, 25 sites licenses are charged at $69, $99, $199 per year respectively.

Final Words

Deleting all of the products that are no longer sellable in your store is of great importance, especially when you’re seeking to keep your WooCommerce store up to date and well organized for customers.

We hope that our guide on how to delete all products in WooCommerce has provided you with a wealth of information.

Please feel free to reach out to us in the comments section below if you have any questions. We are delighted to help you out.

Thank you for reading and we’ll see you in the next article.

Recommend for you
Image Description
SMS, Email Marketing Automation

Top rated Marketing automation for Shopify stores

Learn more
Image Description
SEO Suite

Auto-optimize website elements and structure in one-click.

Learn more
proofo
Boost Sales [Free]

Boost sales: Sales Pop, Trust badges, Countdown timer, more

Learn more
Image Description
Photo Reviews [Free]

Use photo reviews to boost sales

Learn more

Subscribe

Stay in the know

Get special offers on the latest news from AVADA.

40k subscribers has been joined!

Earn $10 in reward now!

comment
iphone
go up