Rating 5 stars - 2 votes

How to Delete Magento Orders

Building site for online shopping, store owners usually perform lots of in-development operations that involve testing if this or that part of the show is ready and working properly. So after you have installed your Magento, established the store catalog with category tree and goods, selected template, you might need to test if payment transactions are working as expected. For that you create a few test orders.

Do you know what you will see in ‘Orders’ section after you launch your site? Your test orders and no ‘Delete Order’ button.

Does Magento Allow Delete Orders?

Magento insists on the orders to be stored, instead of completely removed. You can only set orders status to ‘cancelled’, but cannot delist it completely. This can be quite frustrating both to developers and the merchants. While the decision to limit orders removal makes sense, as they contain customers payment information and deleting it is considered as a fraud. Magento cares about buyers’ safety and limits the ability to do illegal things even by mistake.

Magento Delete Orders Workarounds

Sure thing, that if you are reading this article, you would love to see a “Delete Orders” functionality. So what to do? Are there any workarounds to remove order?

Yes, there is the possibility to remove test orders (and only only for that reason!)

There are multiple tips on different forums, but the main thing not to forget using them is:

Make sure you always have a proper backup of your database before any mass changes.

Solution 1: Tackle the Problem Right in Database

1) Delete orders from PhpmyAdmin

To do so, you have to log on your PhpmyAdmin (use full access). Empty all the database tables related to order by running raw queries.

2) Write script

You need to create/find/modify php script and run it from corresponding section of Magento.

Things to consider:

  • For the above solutions you need to have tech skills or at least know and where to paste a piece of code.
  • Almost all of these methods refer to delete all orders that will suit for you in case you already have real orders.

Solution 2: Avoid Dangerous Operations in Database

Deleting orders directly in the database can be very dangerous, because Magento has a very complex database structure and many database tables that are linked together. If you do some incorrect move and delete some important for Magento data in one table, this may affect the entire database. So, what to do?

Use Store Manager for Magento application. Using it you do not need to be a developer of tech expert and avoid the direct intervention into the database which, by the way, may be harmful.

Download Store Manager for Magento! Delete Orders FREE

Once Store Manager is installed at your PC, go to Orders section, select unwanted orders and press ‘Delete’ button.

Magento 1.9 and 2 orders editing, deleting
Magento 1.9 and 2 orders editing, deleting

Now, selected test orders are removed from your Magento store and it will be in a clean state to start over.

Save your working hours and efforts! Remove test orders without coding! Try FREE

Related Articles:

Card image

How to Replace or Delete Magento Order Items

Learn how to remove order details or substitute them with other details; check the way to delete order items using credit memo. Read More...

Card image

How to Remove Magento 2 Order?

Find out how to delete Magento 2 order without breaching Magento limits. Read More...

Card image

Magento Order Management with POS

The list of benefits provided by Magento integration with POS system and instructions on how to use the POS. Read More...

Card image

Magento 2 Abandoned Cart Recovery via Followup Emails

Guides on how to get the list of customers with abandoned carts and send them an email reminder using a specific template. Read More...

Stewart Hastings
Stewart Hastings • 07/24/2015

Just had a chance to use your solution and it worked like a charm. Before I was trying some scripts, but they always returned me with errors. Finally, I don’t have to delete many tables in many times. Is there something like that to clear up all test customer accounts and product data in one go safely? Can your tool help me to modify payment method, shipping and handling information for multiple orders in bulk? I will share the link with my merchants or development partners who asks about deleting test transactions. Thanks!

Magento Store ManagerMod Stewart Hastings • 07/24/2015

Hello Stewart!
Thank you for your comment. Glad that tutorial was helpful.
Removing orders you clear related info on the customer, who placed it. However, since one person can make a few orders, to delete clients' accounts massively, go to Customer section of Store Manager. There select client records to be removed and press 'Delete' button.

Magento Store ManagerMod eMagicOne • 07/24/2015

Check this screen-capture:

Comment screens
Comment screens