A single instance of the Adobe Commerce software enables you to start multiple websites or store views that use different attributes and content, such as:
- Default languages
- Domain names
This flexible solution enables one Magento codebase and Admin to administer and display different stores. You configure the websites, stores, and store views in the Admin. Use certain variables in virtual hosts to start the Magento application using these websites or store views.
A typical use is to set up stores with different options in different domains. For example, you could have one set of categories and products on one domain and another set of categories and products on a separate domain in a different language.
You configure the websites, stores, and store views in the Magento Admin. Use the
MAGE_RUN_CODE variables in virtual hosts to start the Magento application using these websites or store views.
Consider the following terms:
Website—is the top-level container for sites, shipping methods, payment methods, and more. To create completely separate sites that do not share cart, shipping methods, or other you must create separate websites.
Website customer accounts can be shared between multiple websites within a single Magento instance. A website contains at least one store. Catalog prices should be managed at the website level.
Store—is contained by a website. In turn, a store contains at least one store view.
Multiple stores can share cart, user sessions, payment gateways, and more, but they have separate catalog structures and Catalog price.
Catalog Qty (inventory) can not be managed at the store level. Inventory is managed at Website or Global level only.
Store views change the way pages are presented, and are typically used to display a store with different layouts or languages. You can manage different currencies per store view.
Each website and each store view must have a unique identifier. This identifier is required to use the
MAGE_RUN_CODE variables as follows:
MAGE_RUN_TYPEcan be either
websiteto load a website in your storefront.
storeto load any store view in your storefront.
MAGE_RUN_CODEis the unique website or store view code that corresponds to
The following is a summary of the tasks you must perform:
- Set up websites, stores, and store views in the Admin.
- Create a virtual host to load many websites or one virtual host per Magento website or store view to allow specific directives for each store.
- Pass the values of
MAGE_RUN_CODEto the web server.