What is multistore?
Magento is an online shop platform. Multistore means one install can serve more than one shop front. The shops can share products and customers, but show different names, designs or languages. Think of one warehouse with several shop windows.
Magento uses three levels:
| Level | Meaning |
|---|---|
| Website | The top level. It holds customers, prices and payment settings. |
| Store | Sits inside a website. It chooses a root category, which is the main product tree. |
| Store View | Sits inside a store. It is mostly used for a language or a look. |
Warning: Take a full backup first. Wrong settings can break your shop.
Steps (Magento 2)
Part 1: Make the structure
- Log in to the admin panel.
- Go to Catalog, then Categories. Click Add Root Category and name it, for example Second Shop. Save it.
- Go to Stores, then Settings, then All Stores.
- Click Create Website. Type a name and a code, such as
shop2. Click Save Web Site. - Click Create Store. Pick the new website and the new root category. Save it.
- Click Create Store View. Pick the new store, give it a name and code, and set Status to Enabled. Save it.
Part 2: Set the address
- Go to Stores, then Configuration, then General, then Web.
- Use the scope switcher at the top left. Choose your new website.
- Open Base URLs. Untick Use Default and enter the address, for example
https://shop2.yourdomain.com/. - Click Save Config.
Part 3: Point the web server
- Create the subdomain or add the domain in cPanel. Set its document root to the same folder as your main Magento.
- Edit the
.htaccessorindex.phpso Magento knows which website to load. A common method is to setMAGE_RUN_CODEto your website code andMAGE_RUN_TYPEtowebsite.
This step differs by server. Ask Hostvento support if you are unsure.
- Clear the cache in System, then Cache Management.
- Visit the new address and check that it loads.
Tip: Assign products to the new website in each product's Product in Websites section. A new shop with no assigned products looks empty.
Quick recap
- Magento has three levels: website, store and store view.
- Create a root category, then the website, store and store view.
- Set the base URL for the new website.
- Point the domain at the same Magento folder.
- Assign products and clear the cache.