Change Order, Invoice, Credit Memo or Shipment Number Prefix or Suffix in Magento2

In some cases shop owners have to change their default order number with a custom prefix or suffix. Customising order numbers sounds complicated, but it can be done with only few MySQL queries.

First, backup your database. After that, get a list of meta_id’s and store_id’s with the following query for order numbers only.

The meta_id is pretty much the identifier you need for the next UPDATE query which will add the letter A as a prefix. For example: A100000001

The same query can be used to change the suffix. Also, you can change the prefix or suffix for any entity_type such as invoice, creditmemo or shipment.

That’s it. Create a new order to see the results.

Reset Administrator User Password in Magento 2

Magento 2 comes with a CLI that allows you to create a new temporary administrator user within few seconds. Change to the directory where your Magento installation ( such as app or bin folder ) is located and run the following command to create a user support with password 8cd98f00b20.


Now you can go to System > Permissions > All Users and update other users credentials.