Delete all Woocommerce products

This is a very useful script if you would like to delete all Woocommerce Products from WP installation.

Create a file in your root folderĀ e.g. delete-woocommerce-products.php. Paste the following code inside script.

That’s it! Now run script by calling http://yourwebsite.com/delete-woocommerce-products.php

Attention: Backup your database before running this script! Do not forget to delete the file you’ve created after you delete the products!

Code Snippets, Development Tips, WooCommerce
Previous Post
Theme switcher WordPress plugin
Next Post
Better WordPress Performance with htaccess
Menu