Difference Between MAGE_RUN_CODE and MAGE_RUN_TYPE in Magento 2.x

Each website as well as each store view must have a unique identifier.

These unique identifier are required to use the MAGE_RUN_TYPE and MAGE_RUN_CODE variables as below following steps

MAGE_RUN_TYPE can be either store or website

The Website is used to load a website in your storefront.

The Store is used to to load any store view in your storefront.

MAGE_RUN_CODE is the unique website or store view code that corresponds to MAGE_RUN_TYPE

Leave a Reply

Your email address will not be published. Required fields are marked *