CODE
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 delete orders
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:


how to replace or delete magento order items article

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...

how to remove magento 2 order article

How to Remove Magento 2 Order?

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

magento order management with POS System

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...

magento 2 abandoned cart recovery via followup emails article

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...


COMMENTS
Live Chat