It is important to remain vigilant when running a WooCommerce store. To keep the store updated and have products that are more likely to sell, one must stay on top of everything, from what's trending to what's selling. In this tutorial we will learn how to permanently delete WooCommerce products with one click
Adding comes with deleting. I take it that if you add seasonal goods or items that won't be sold for a while, then they have to be taken away? Accessing this feature of WooCommerce would require you to log into your account.
Getting rid of all WooCommerce items is a fantastic idea, especially if you have a lot of them and need to make your site look cleaner.
There are a variety of reasons why store owners may want to erase all of their products, however the reason, it is possible!
Why do you need to delete WooCommerce products
The need to delete all WooCommerce products may arise in a number of scenarios. Following are five of the most common reasons:
- Products that are currently unavailable for purchase
Out-of-stock items should be removed from the store if they are unlikely to be replaced.
- Items that aren't selling
If you have products that aren't selling, you should get rid of them rather than letting them sit around rusting away and paying costs for unsold goods.
- For testing purposes
Before launching the main product, you produce a number of test items to confirm that everything is in working order. You must also delete the test items after the final product is released.
- Seasonal delicacies
Products that were only good for a short period of time. After that, products will fall out of favour, and you'll have to eliminate them all at once.
- Cyclical products are those that have a cyclical character to them.
At regular intervals, inventory is replenished with new things, such as new apparel for each major season. You must remove the old stock from the system so that it is no longer accessible.
Delete all Products from WooCommerce
We will be seeing 3 methods to delete products from WooCommerce, namely:
- Manually delete all products from WooCommerce
- Delete all products from WooCommerce using an SQL command
- Delete all products using "Smart Manager"
Manually delete all products from WooCommerce
The WooCommerce delete all products task can be performed directly from the product page when the number of products to be deleted is less than a few hundred.
This is a long and arduous process. It will take a long time if you don't limit the range of products per page to 100 or less.
- Go to WP dashboard
- Click Products -> All products from the left hand side menu
- Select products one by one (or apply a filter)
- Click on Bulk Actions. Select "Move to Trash"
- Click Apply
You must next delete these products from the Trash in order to permanently remove them.
Delete all products from WooCommerce using an SQL command
When the total number of products to be eliminated reaches in the thousands, this operation would take a long time. Also, performing SQL queries for complex scenarios isn't for everyone because you risk losing a lot of data if something goes wrong. As a result, this solution requires exceptional coding skills.
- Go to your CyberPanel Dashboard
- Click Database -> PHPMyAdmin from the left hand side menu
- Create a backup of you database by exporting your database
- Enter SQL Query by selecting SQL from top
- To begin eliminating all products in your WooCommerce store, put the code below into the MySQL query.
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');
- Click the Go button to run the query.
Delete all products using "Smart Manager"
This plugin gives you the ability to create an Excel-like spreadsheet that can be used to manage your WooCommerce store.
You can use Smart Manager plugin for everything - managing products to bulk editing - adding, deleting, and updating.
- Go to your WordPress dashboard
- Click Plugins -> Add New from the left hand side menu
- Search for "Smart Manager". Install and Activate it.
- Click on "Smart Manager" from the left hand side menu
- Select Products from the top
- Select Products you want to delete
- Click Delete icon. Choose from "Move to Trash" and "Delete Permanently"
It's critical to delete all of the products in your store that are no longer sell able, especially if you want to maintain your WooCommerce store up to date and neatly organized for clients. In this article we have discussed three methods to delete products.
Leave a Reply