How to Delete All WooCommerce Orders in cPanel in One Click?

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

  1. Log in to your cPanel account.
  2. Scroll down to the Databases section.

Step 2: Open phpMyAdmin

  1. Click on phpMyAdmin to manage your WordPress database.
  2. Select the correct database associated with your WooCommerce store.

Step 3: Run the SQL Query to Delete Orders

  1. Click on the SQL tab.
  2. 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);
  1. 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

  1. Log in to your WordPress admin panel.
  2. Navigate to WooCommerce → Orders.
  3. 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:

Leave a Comment

Your email address will not be published. Required fields are marked *

COMMANDEZ MAINTENANT
× Chat with us!