Well, usually during development, you might need to place few orders to test our overall system which needs to be removed before moving the site to production. Natively, Magento doesn’t allows us to delete orders. In this case, you may need some trick. Well, you can use the following method:
Run the following SQL Queries and it will do the job:
Note: This will reset and remove all your orders, orders history and bestseller data etc. So, run this if you have a backup of the data first or you find the existing data of no use.
Important: Please do not truncate these tables:
sales_order_status
sales_sequence_meta
sales_sequence_profile
sales_order_status_label
sales_order_status_state
2. Using Magento 2.x Extension
Well, using MySQL might not be ideal for all of the situations. What if you need to delete any particular order(s). Also, using MySQL requires prior technical knowledge of it and might be complex for some.
Learn how to create custom shipping methods in Magento 2 with this step-by-step developer’s guide. Enhance your Magento store with personalized shipping opti...
Learn the differences between observers and plugins in Magento 2, and understand when to use each for customization. A comprehensive guide for developers.
Discover how to boost Magento 2 performance using Redis caching. Learn what Redis is, how it works, and how to configure it for enhanced speed and scalabilit...