Managing WooCommerce orders can become overwhelming, especially when testing your store or handling bulk order data. If you’re looking for a quick way to delete all WooCommerce orders in one click, this guide will show you how. Follow these simple steps using cPanel and phpMyAdmin.
Why Delete WooCommerce Orders?
There are several reasons why you might need to remove all orders from WooCommerce:
- Cleaning up test or demo orders before launching your store
- Resetting order data for better organization
- Improving site performance by reducing database size
Step-by-Step Guide to Deleting WooCommerce Orders
Step 1: Access Your cPanel
- Log in to your cPanel account.
- Scroll down to the Databases section.
Step 2: Open phpMyAdmin
- Click on phpMyAdmin to manage your WordPress database.
- Select the correct database associated with your WooCommerce store.
Step 3: Run the SQL Query to Delete Orders
- Click on the SQL tab.
- Copy and paste the following SQL query:
DELETE FROM wp_posts WHERE post_type = 'shop_order';
DELETE FROM wp_postmeta WHERE post_id NOT IN (SELECT ID FROM wp_posts);
DELETE FROM wp_woocommerce_order_items WHERE order_id NOT IN (SELECT ID FROM wp_posts);
DELETE FROM wp_woocommerce_order_itemmeta WHERE order_item_id NOT IN (SELECT order_item_id FROM wp_woocommerce_order_items);
- Click Go to execute the command.
🚀 Note: If your database prefix is different (e.g., wp123_
instead of wp_
), update the table names accordingly.
Step 4: Verify the Deletion
- Log in to your WordPress admin panel.
- Navigate to WooCommerce → Orders.
- Confirm that all orders have been successfully removed.
Important Precautions
✅ Backup Your Database – Before executing SQL queries, always create a backup to avoid accidental data loss. ✅ Check Database Prefix – Ensure that the table names match your database structure. ✅ Use a Staging Site – If unsure, test the process on a staging site first.
Need Help? Watch Our Video Tutorial!
For a detailed walkthrough, check out our video tutorial:
🎥 How to Delete All WooCommerce Orders in cPanel | Quick & Easy Guide (2025)
Final Thoughts
Deleting WooCommerce orders is a straightforward process with phpMyAdmin. If you need further assistance, Codarab Dev is here to help! Visit codarab.com for more WordPress and WooCommerce solutions.
🚀 Need a custom WooCommerce plugin? Contact Codarab Dev today!
You may also find these articles helpful:
- How to Fix the “There Was an Error Processing Your Order” Error on WooCommerce Checkout Page (2 Easy Steps)
- Fix “This High-Performance Order Storage Plugin Is Incompatible” Error in WooCommerce
- Redirect to Checkout Page When Clicking “Buy Now” or “Add to Cart” in WooCommerce
- Automatically Mark Processing Orders as Completed in WooCommerce
- Fix WordPress Users Not Appearing in Dashboard (Simple & Effective Guide)
- WooCommerce Checkout Redirect for High-Risk Businesses