How to delete all products in WooCommerce
You may be wondering, ‘why, and how, would you delete all products in WooCommerce?’ WooCommerce is a fantastic tool for creating e-commerce websites. It’s a highly customisable, open-source, well supported and incredibly intuitive system. It’s easy to set up products from scratch, but also (with the right skills) you can import product data from another platform or another WooCommerce website.
Importing product data from one website to another can be tricky and quite expensive, depending on where it’s being imported from and the size of the product data. This can result in product data being set up incorrectly from the import. As a result, you may need to clear all product data and start again. We will talk about why and how to do this in this article.
Why would you want to delete all products in WooCommerce?
To avoid clutter and unnecessarily increasing the size of your database, the best option would be to clear the product data. This should be done whilst avoiding the need to remove some existing content in other areas of the WooCommerce plugin set-up, or content that’s already been added to the WordPress website. In other words; so that you don’t have to wipe everything from the database.
How do you delete all products in WooCommerce?
Now let’s talk about how we go about doing this, (presuming you have unwanted product data that all needs to be removed.)
There are multiple types of data you’d need to remove. They are as follows:
- Customers (users)
How to Clear Product Data
Here are the steps to delete all products in WooCommerce.
- Go to Products > All Products
- By default there will be 20 items per page, but you can increase this by going to Screen Options and amending the Number of items per page. Be careful here though, increasing this number too high may cause the page to crash.
- Now you have desired items per page (the more items per page, the quicker it will be), check the box in the top left to select all products on that page.
- Once all products have been selected, select the “Bulk actions” drop down menu above it and click “Move to trash”.
- Now that your products are in Trash, they would need to be deleted permanently. In All Products, click on the “Trash” tab, select all, click Bulk actions and delete permanently.
How to Clear the Transients
The above step would need to be repeated for the other data types listed above, e.g. categories. For each step (or at least after all the relevant steps have been completed), you will need to clear the Transients in WooCommerce, to ensure all the data has been cleared.
Here are the steps to do this:
- Head to WooCommerce > Status > Tools
- Click “Clear Transients” for WooCommerce transients and Expired transients.
This is the most efficient way to ensure all unwanted product data is cleared, without the need to directly access a database or use any coding skills. Clearing the transients is arguably a very important and often overlooked step in the process, but it is vital in ensuring the database (for WooCommerce products) is as clean as possible.
We hope this guide on how to delete all products in WooCommerce has been useful.