Adding Stores
A single installation of Magento can have multiple stores that share the same Admin. Stores that are under the same website have the same IP address and domain, use the same security certificate, and share a single checkout process.
The important thing to understand is that the stores use the same Magento code and share the same Admin. Each store can have a separate catalog, or the stores can share the same catalog. Each store can have a separate root category, which makes it possible to have a different main menu for each store. Stores can also have different branding, presentation, and content. Take some time to plan your store hierarchy with future growth in mind before you begin, because it is used throughout the configuration.
Here are some examples of how URLs can be configured for multiple stores:
URL | Description |
---|---|
yourdomain.com/store1 yourdomain.com/store2 |
Each store has a different path, but shares the same domain. |
store1.yourdomain.com store2.yourdomain.com |
Each store has a different subdomain of the primary domain. |
Step 1: Choose the Store Domain
The first step is to choose how you want to position the store. Will the stores share the same domain, each have a subdomain, or have distinctly different domains? For each store, do one of the following:
- To place the store one level below the primary domain, you do not have to do anything.
- Set up a subdomain of your primary domain.
- Set up a different primary domain.
Step 2: Create the New Store
-
On the Admin sidebar, go to Stores > Settings > All Stores.
-
Click Create Store and set the options for the new store:
-
Web Site — Choose a website that is to be the parent of the new store. If the installation has only one web site, accept the default (
Main Website
). -
Name — Enter a name for the new store. The name is for internal reference only.
-
Code — Enter a code in lowercase characters to identify the store. For example:
mainstore
. -
Root Category — Set to the root category that defines the category structure for the main menu of the new store. If you have already created a specific root category for the store, select it. Otherwise, select
Default Category
. You can come back later and update the setting.
Store Information
-
-
Click Save Store.
New Store
Step 3: Create a Default Store View
-
Click Create Store View and set the store view options:
-
Store — Set to the new store you created.
-
Name — Enter a name for the view. For example,
English
. -
Code — Enter a code for the view in lowercase characters.
-
Status — Set to
Enabled
. -
Sort Order — Enter a number to determine the store’s position when listed with other stores.
-
-
Click Save Store View.
If you were to open your store in edit mode, you would see that it now has a default view.
New Store with Default View
Step 4: Configure the Store URL
-
On the Admin sidebar, click Stores > Settings > Configuration.
-
Under General in the left panel on the left, choose Web.
-
In the upper-left corner, set Store View to the view that you created for the new store.
-
When prompted to confirm scope switching, click OK.
Choose the New Store View
-
Expand the Base URLs section and enter the base URL for the store.
If needed, clear the Use system value checkbox to change the setting.
-
Expand the Secure Base URLs section and repeat the previous step as needed to configure the store’s secure URL.
-
Click Save Config.