Magento 2 multistore is yet another outstanding example of Magento’s flexibility as a platform. This feature allows you to run separate stores under one Magento admin account. You can manage these accounts conveniently from the same backend.
Let’s take a look at this feature in more detail and learn how to set it up for your store. Please keep in mind that the multistore feature is only available for Magento Commerce versions.
Table of Content:
What is Magento 2 Multistore Exactly?
Under the same Magento 2 entity, a Magento Commerce admin can run multiple stores using different domain names, default languages, currencies, products, and categories. You can create multiple stores with different URLs under the same Magento installation.
Here’s how the hierarchy of a Magento 2 multistore will look like:
1. Website
A website comes at the highest level and contains all your storefronts, shipping methods, payment methods, etc. If you want to create different stores that do not have shipping methods, cart methods, etc in common, then you will have to create different websites.
A single Magento instance (admin account) can hold multiple customer accounts that can be shared between multiple websites. Catalogue prices should be handled at the website level. One website should contain at least one store.
This means, all stores under one Magento website will have shipping methods, payment methods, catalogue prices, etc in common.
2. Stores
A store is contained in a website, and one store contains at least one store view. Having different store views in a store basically means using different layouts, designs, and languages, You can also manage different currencies per store view.
The catalog price and structure will be different for every store view, but multiple stores can share cart user sessions, payment gateways, and more. The Catalog Qty (inventory) has to managed at the website or global level only, and not at the store level.
Interesting read: Magento Security: Ultimate Guide for Magento Merchants
How to Set Up a Magento 2 Multistore
Step 1: Create websites
1.Login to the Magento admin panel and select Stores > Settings > All Stores.
2. On the all stores page, click on create website.
3. Add a:
- Name for your website
- A unique code (for example; electronics if you have an electronics store)
- A numerical Sort order to indicate the order or your store’s priority (this is optional)
4. Then click on save website.
5. Repeat these tasks if you wish to create multiple websites.
Step 2: Create Stores
1. Visit the All Stores page like in step 1.
2. Click create store .
3. Add a:
- Website: select the name of the website with which you want to associate the store.
- Name of your store
- Unique code of your website
- Select the name of the root category of your new store
4. Click save store and repeat the tasks if you want to create multiple stores.
Step 3: Create multiple store views
1. Visit the All Stores page again.
2. Click on Create Store View
3. Add the following details:
- Select the store name with which you want to associate your store view.
- Enter a name for your store view.
- A unique code to identify this store view.
- Select Status > Enabled
4. Save Store View and repeat the same steps to add multiple store views
Step 4: Change the website base URL
1. In the admin panel, navigate to Stores > Settings > Configuration > General > Web
2. From the Store View panel at the top of the page, click on the name of your website
4. In the right hand menu, expand Base URLs section and clear Use system value
5. Enter the http://example.magento.mg
URL in the Base URL and Base Link URL fields.
6. Repeat the previous step in the Base URLs (Secure) section and click on save config once done.
Step 5: Change the default store view base URL
This step is important to perform because you will lose access to the Magento Admin, your access will only return after you setup virtual hosts.
1. In the admin panel, again navigate to Stores > Settings > Configuration > General > Web
2. From the store view panel, click on Default Config
3. In the right-side panel, expand base URLs and clear Use system value.
4. Repeat this step in the Base URLs Secure section.
If you have any queries or feedback, do mention in the comments below!
Divya loves writing and is passionate about marketing. When not trying to hone her skills, you’ll find her either reading or binging on TV shows.
0 Comments