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

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