Which way do you reset magento orders?

Which way do you reset magento orders?

July 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Which way do you reset magento orders?

Resetting Magento Orders: A Comprehensive Guide

When working with Magento, you might occasionally need to reset your order system for various reasons—testing, data cleanup, or simply starting fresh with new order numbers. This process involves two main steps: clearing the existing orders from the database and ensuring that the next generated order starts with a specific number.

Step 1: Completely Remove All Orders from the Database

To remove all orders from the Magento database, you’ll need to delete entries from specific tables in your MySQL database. Here are the tables to focus on:

  • sales_order
  • sales_order_grid
  • sales_order_item
  • core_resource

You can use SQL commands to delete these records. For example, in your MySQL terminal or using a tool like phpMyAdmin, run the following queries one by one:

DELETE FROM sales_order;
DELETE FROM sales_order_grid;
DELETE FROM sales_order_item;
DELETE FROM core_resource WHERE code = 'sales_order_agr';

Note: Always backup your database before performing any deletion operations.

Step 2: Set Up the New Order Number

To ensure that your next order starts with a specific number, you need to manipulate the increment_id value in the sales_sequence_meta table. Here’s how:

  1. First, find the current maximum entity_id value from the sales_order table:
SELECT MAX(entity_id) FROM sales_order;
  1. Let’s assume this value is 50 for an order with ID #100000050.

  2. You want the next order to start at #100000001. To achieve this, update the value field in the sales_sequence_meta table where increment_id equals ‘order’:

UPDATE sales_sequence_meta SET value = 51 WHERE increment_id = 'order';

You’ve now set up your system to generate new orders starting from #100000001.

Conclusion

Resetting Magento orders involves a combination of database operations and sequence meta management. By following the steps outlined above, you can successfully clear your existing orders and prepare the system for generating new orders with the desired starting number.

Remember that manipulating the database directly should be done carefully, ensuring that you have proper backups in place before making any changes. If you find yourself needing more advanced data management or integration solutions, consider reaching out to professional Magento development services like those offered by Laravel Company.

This reset process should provide a clean slate for your ordering system while maintaining the necessary integrity and functionality required for your business operations.

Database Admin Configuration Orders

Our network