Skip to content

Magento 2 Order Number

Every order in Magento 2 is assigned a unique number. It begins with the default values 100000001, 100000002, etc.

Suppose you need to cover the actual order number from your customers/competitors, decrease the order number clutter for different shop views, or make it more user-friendly. In that case, there are considerable methods to accomplish it.

Editing Order Number in Magento 2

This is how Order # may be modified:

  • Change the first digit of the order number in phpMyAdmin, MySQL Workbench, or other database browsing programs.

  • Reduce the order number length from the normal nine characters to as much as you require.

  • Modify the last digits.

The first option is helpful if you have many shops and need to monitor orders from a particular website (e.g., for an English Store View, you would get 100000001, whereas for the French one - 200000001). The 2d & 3d are applicable in every situation.

Important! Create a backup of your database before you begin!

Difference Between 'Order ID' and 'Order Increment ID'

You can also locate the order_id and order_increment_id values in the backend. Here are the differences from order id:

  • Order id is the internal Magento 2 order ID and the primary key of the sales_flat_order table.

  • Order increment id is the external ID for communicating with customers in Magento 2.

Either manually alter specific database tables and automate the field with the required order number using third-party extensions.

Important! Remember to create a database backup.

How to Change 'Order Increment ID' in Magento 2

  1. Using phpMyAdmin, you can access the MySQL database for your Magento 2 shop.

  2. Find the table “sequence_order_1'. Note that this table is inside the database itself, not the 'information_schema.'

  3. Navigate to the 'Operations' page and update the required 'increment_id' value under it.

How to Modify the 1st Order # in a New Magento 2 Store

  1. Using phpMyAdmin, you may access the MySQL database for your Magento 2 shop.

  2. Find the 'sequence_order_1' table and open it. Note that this table is inside the database itself, not the 'information schema.'

  3. Navigate to the 'Operations' page and update the 'Auto_Increment' field with the required order number.

Important! Remember to create a database backup.


Last update: 2022-06-29