Magento delete order

08.Oct.2010

Magento does not come with an option to actually delete existing order. You can “Cancel” it or put it on “Hold”, but not delete it for good. Lucky for us – there is a way to make Magento delete order by using a simple MySQL snippet.

1
2
3
4
SET @increment_id='4400000002'; --replace with your order ID
SELECT @order_id:=entity_id FROM sales_order_entity WHERE increment_id=@increment_id;
DELETE FROM sales_order_entity WHERE entity_id=@order_id OR parent_id=@order_id;
DELETE FROM sales_order WHERE increment_id=@increment_id;