Get Free Audit

How to Set up Magento 2 Multi Stores

Jun 18, 2019

10834 Andrey Litvin

How to Set up Magento 2 Multi Stores

Do you want to manage multiple websites and online stores in Magento? With the in-built multi-store functionality, there is nothing easier. Read and learn how to work with Magento multistore.

Magento is an amazing platform that can fulfill the dynamic needs of large, middle and small ecommerce businesses all over the world. Magento has a great variety of advantages and benefits over other platforms. It is highly adaptable, extensible and user-friendly.

There is a wonderful functionality in Magento that allows it to stand out among the competing platforms – the ability to manage Magento multiple stores through a single platform. In this article, we focus on all the ins and outs of this feature.

Magento offers a built-in feature to manage multiple sites with a single platform. This is perfect for store owners who own or manage multiple Magento installations and want them all on a single platform. The feature grants them a single admin panel to view and control these ecommerce sites.

In this article, we will speak about multi store ecommerce, learn about Magento multi stores and their structure. Do you know how to set up multiple websites in Magento? Do you want to learn how to change the default store in Magento and how to configure multiple stores in Magento? All you need is to read our article.

In addition, you will learn about the different advantages and disadvantages of Magento multi store. And finally, we will consider some problems with Magento multi store feature and find the perfect solution to them.

Table of contents:

Why does your business need multi store
What is Magento multistore
How to set up multiple websites in Magento
How to configure Magento multiple stores – four methods
What are the advantages and disadvantages of Magento multistore
Magento multistore feature: problems and solutions

Why does your business need multi store?

How well do you know what multi-store is? Is it different from a single store? Let’s find out what a multi-store is.

First of all, a multi-store is several stores sharing one or several parts of the cart system. This cart system allows customers to find and buy products and services on the Internet. It is perfect for any business on the international markets.

Secondly, a multi store includes several stores on one domain. It will be possible to sell in different places at the same time. It is very convenient, money and time-consuming.

Then, a multi store is several independent stores (with different domains, skin, shipping, etc.) sharing a common shopping cart. It is a good solution for independent stores to have a common shopping cart which allows to start selling online immediately.

Finally, a multi store is a multi-vendor shopping cart. The advantages of a multi-vendor shopping cart are:

  1. It allows different vendors to sell and manage their products in a single place with a common storefront and product catalog
  2. It saves your time and money
  3. It is easy to build an online marketplace
  4. It is fast and easy to configure payment and shipping methods, change settings and products, control of what is added to the product catalog.

Now, let us explore deeper into the nature of multi stores and focus on the hierarchy of Magento 2 multiple stores.

migration to magento 2

Magento 2 Migration

Take your online store to the next level with BelVG Magento migration

Visit the page

What is Magento multistore?

Before we address the process of setting Magento multiple stores, it is vital to have a clear understanding of multi store structure in Magento.

Magento Websites

As you install Magento, you get to operate only one website, which by default is called the “Main Website”. A store owner can also set up several websites for a single installation, each of which has its own IP address and domain.

Magento Stores

One website can have several stores, each with its own main menu. Shops have the same product catalog, but may differ in a variety of products and store design. All stores under one website have the same administrator and cashier.

magento multistore structure

Magento Store Views

Each store, which is available to customers, is represented in accordance with a certain “type”. Initially, the store has one default view. Additional store views can be added to support different languages ​​or for other purposes. Customers can use the language selection in the header to change the store view.

In a nutshell, the largest entity is a Magento website that can incorporate several Magento stores. Magento stores, in their turn, can consist of a number of Magento store views.

Now, let us proceed to the more technical aspects, in particular – how to work with Magento multistore, how to set them up and configure.

How to set up multiple websites in Magento

Step #0: set unique identifiers for Magento website and store

Each website and store must have a unique identifier, which is required to set up the variables MAGE_RUN_TYPE and MAGE_RUN_CODE.

MAGE_RUN_TYPE can have two values:

  • website is needed to download the website,
  • store to load the store view.

MAGE_RUN_CODE is a unique website or site code.

Step #1: create a root category.

NB! Each can have a separate root category, which allows you to have a completely different set of main menu options for each store.

Navigate to Catalog -> Categories.

catalog category magento

Press Add Root Category button.

add root category

Enter a unique root category name into the corresponding field and press Save.

root category settings

Step #2: create a new website.

Navigate to Stores -> Settings -> All Stores.

stores all stores magento

Press Create Website button.

create webstore

Fill in the following fields:

website info

  • Name of the new website
  • Code – a unique identifier of the website
  • Sort Order – the priority of the new website.

Press the Save Web Site button.

Step #3: create a new web store.

Go to Stores > Settings > All Stores.

stores all stores magento

Press Create Store button.

create webstore

Complete the following settings:

stores setting

  • Web Site – what website the store will belong to
  • Name – the name of the new web store
  • Code – code identifier of the website
  • Root Category – the root category the store will belong to

Press Save Store button.

Step #4: create Store View.

Navigate to Stores -> Settings -> All Stores.

stores all stores magento

Press Create Store View button.

create webstore

Complete the following settings:

store view info

  • Store – what website the store will belong to
  • Name – the name of the new web store
  • Code – code identifier of the website
  • Status – enable or disable the store view
  • Sort Order – the priority of the new store view

Press Save Store View.

How to configure Magento multiple stores

There are several ways how to Magento configure multiple stores, suitable for store admins and Magento technical specialists. In this paragraph, we will describe all the possible methods.

Method #1: How to configure Magento multiple stores via admin panel

There are also several additional multistore configurations that will certainly prove useful and must be described along with the creation methods.

How to change Magento website URL

Step #1: navigate to Stores -> Settings -> Configuration.

stores settings configuration

Step #2: expand the General tab and press Web.

general web

NB! make sure that you make configurations to the right store view.

Step #3: expand the Base URL section.

base url

Step #4: enter your domain into the Base URL and Base Link URL fields.

Step #5: press Save Config.

How to add Magento store code into the URL address

Step #1: navigate to Stores -> Settings -> Configuration.

stores settings configuration

Step #2: expand the General tab and press Web.

general web

NB! make sure that you make configurations to the right store view.

Step #3: expand the URL Options section.

url options

Step #4: set Add Store Code to Urls at Yes.

Step #5: press Save Config button.

Step #6: navigate to System -> Cash management and press Flush Magento Cache.

cache management

How to change Magento store view base URL by default

Step #1: navigate to Stores -> Settings -> Configuration.

stores settings configuration

 

Step #2: expand the General tab and press Web.

general web

Step #3: select Default Config in Store View list.

default store view

Step #4: expand the Base URL section.

base url

Step #5: enter your domain into the Base URL and Base Link URL fields.

Step #6: press Save Config.

How to change the default store view in Magento

Step #1: log in to Magento back office and navigate to Store -> All stores.

stores all stores magento

Step #2: select the store you wish to change default store view.

main website store

Step #3: set up the Default store view you want your store to have.

configuration

Step #4: press Save Store in the upper right corner.

Method #2: How to perform Magento 2 multistore nginx rewrite

Step #1: add the following config into the /etc/nginx/sites-available/website2 file.


Then add


Step #2: change the nginx.conf.sample file, located at the following path <magento2_installation_directory>/nginx.conf.sample.

Do not make changes in the original file; instead, make a copy of it and alter the copy.

Paste the following lines


The Magento multistore config section should look the following way

Method #3: How to create and configure Magento multiple stores with apache

To create a new Magento store with apache, all you need is to create a new virtual host.

Step #1: edit the configuration file, for instance the /etc/httpd/conf/httpd.conf.

Step #2: add the new virtual host after all existing.

It should look the following way


Step #3: set variables via .htaccess.

For example


Step #4: save and restart the system.

CentOS: service httpd restart
Ubuntu: service apache2 restart

Method #4: How to create separate folders for each store

Step #1: create a store folder in the root category.

Step #2: copy the index.php and .htaccess files from the root category into the newly created folder.

Step #3: edit the Magento 2 multistore index.php in the new folder.

Change require __DIR__ . ‘/app/bootstrap.php’; into require ‘../app/bootstrap.php’.

Before the $bootstrap->run($app); line, add


As a result, your index.php should look the following way:


Igor Dragun

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor

What are the advantages and disadvantages of Magento multistore?

Nothing in the world is perfect, everything has its advantages and disadvantages, and so does multiple stores in Magento. In order to become certain of whether or not your business needs multiple stores, it is crucial to be aware of all the pros and cons of them.

Now let’s compare a multi store and a single store and find out the advantages of a multi store.

1. Administrative panel

In a multi-store, you are a site owner and control all the stores hosted. So, one administrative panel controls all the stores. Apart from this, in a multi-vendor site, you control the backend. Individual vendors control product display and its settings using their password and account.
In a single store, you control all the settings, front-end, and back-end through the administrative panel. So, one panel controls only one store.

2. Localization

In a multi-store you can set-up different stores in various languages for many countries. The main benefit is that it is easy to localize. You have subsites in different languages or for various regions. You can have one store in different languages. It is an ideal solution because people from different countries can see their products in their local language.
Another advantage is that you can do it on the same domain. It will be money-consuming. In contrast, in a single store you have to set-up different stores in many languages with different domains. That is an expensive and not a workable solution.

3. Sell different buyer groups

The advantage of a multi-store is that you can target different categories of your customers- men, women, and children. There is an opportunity to choose various shops for different customers, taking into account their wishes, preferences, interests. It is possible to create and add different stores according to user categories. This will be a profitable and useful solution for your business.

In comparison, in a single store, you cannot create, clear and broad user categories. It is impossible to target different user categories and drive more user traffic to the store. A single store has more drawbacks because it is impossible to target user categories and pay attention to the customers’ wishes and needs.

Magento 2 Integration

Take your online store to the next level with BelVG Magento integration

Visit the page

4. Diversify brand

In a multi-store, you have a great variety of brands. It is easy to create different stores according to your different brands. If you want to enjoy growing sales, pull your brands to different branded stores. It is a good advantage of a multi-stores.

In a single store, it is possible to create a drop down menu that has different brands. But there is a disadvantage. You cannot dedicate a complete subsite customized to a particular brand. Hosting many brands is an excellent opportunity for multi-stores only.

5. Market the same product in different countries

Multi-stores have many benefits. First, it is a good opportunity to host many subsites on the same domain. It is time and money-consuming. In addition, you can change the languages for the audience. You localize and internalize at the same time. Moreover, you have customers from many countries for the same product.

Single stores have a lot of drawbacks. First of all, there is only one language per website. If you want to target many countries then you have to create different stores on different domains. It is not efficient and convenient for using.

6. Multiple vendors on the same website

In a multi-store, it is possible to allow many vendors to rent space on your website for their products. There are many stores like Amazon and others.

In a single-store, Multi Vendor hosting is impossible. And it is a serious problem because customers will not be able to choose from a wide selection of products from multiple vendors.

7. Order management

In a multi-store, the vendors get their orders in the account. The site owner plays no role here. Order management is the vendors responsibility. It is a convenient and useful opportunity. The disadvantage of a single-store is that the site owner takes care of the customer orders.

8. Shipping

Shipping in a multi-store is more efficient because a site owner controls a list of different shipping methods. Product providers or vendor define the shipping rate and its origin.

On the contrary, in a single-store, a site administrator completely controls the shipping. It is not convenient and more difficult and time-consuming for the administrator to control shipping methods and define the shipping rate.

Igor Dragun

Partner With Us

Let's discuss how to grow your business. Get a Free Quote.
Talk to Igor

9. Payment

In a multi-store, all payments go in the merchant account administrator. The administrator checks and transfers the fund to the vendor account. In a single-store, all payments go to the merchant account of the administrator.

10. Backend

There is a difference in controlling the entire backend. In a multi-store, the store owner does not control the entire backend. Individual product vendors have their password-protected display area. They upload and maintain products and manage the settings. In a single-store, on the contrary, the store owner controls the entire back end.

Magento multistore feature: problems and solutions

Creating multiple stores in Magento is fast and easy. All you need is to follow the steps and finally, you will be able to create as many stores as you want. There are no technical or code problems with creating multiple stores in Magento, but sometimes customers may encounter online commerce and SEO related problems.

Let us explore the most common Magento multistore problems and their most suitable solutions.

Problem #1: SSL Certificate limit

Customers may experience the following problem: a single SSL certificate can only serve one IP address and one domain. There are 2 possible solutions. You can add SSL to multiple domains with any of these solutions:

  1. Wildcard SSL: It provides protection to all the subdomains you create.
  2. Subject Alternative Name (SAN) Certification: It provides a solution for stores created on different domains. A single certificate makes administration easy, and in addition to this, it turns out to be light on the pocket.

Problem #2: IP address and SEO hassles

Another problem with Magento multi store feature is that the content can become duplicated.

But there is a simple solution to this problem, yet it requires time and effort – create unique content for each of your Magento stores. It is important to make sure that the content is unique, especially for page title and description. In this case, the content will not become duplicated.

Problem #3 Magento multi store extension issues

Another problem may be connected with Magento Multi Store Extension. In a Magento multi store you can have different plugins for each store. This means an extension can be active for one store but will be useless for the others. Nothing will change until you update your Magento software. You can have this problem even if you are not using the multi store feature., but it will just add more complications to it.

migration to magento 2

Magento 2 Migration

Take your online store to the next level with BelVG Magento migration

Visit the page

Wrapping it up

In conclusion, we can say that Magento multi stores are very useful and efficient for any business, offering many advantages and benefits.

#1: In a multi-store, one administrative panel controls all the shops.

#2: It is possible to set-up different stores in various languages for many countries. It is an ideal solution because people from all over the world can see their products in their local language.

#3: You can target different categories of your customers. It is very profitable and good for your business.

#4: A store owner is able to create different shops according to your different brands. Finally you will enjoy growing sales.

#5: It allows to host many subsites on the same domain; you can also change the languages for the audience. It is very time- and money-saving.

#6: Allow many vendors to rent space on your website for their products. Moreover, order management is the vendors’ responsibility.

#7: Shipping in a multi-store is more efficient because a site owner controls a list of different shipping methods. In a multi-store, all payments go in the merchant account administrator and the store owner does not control entire backend.

So, if you want to build an ideal business, the best solution for you is to choose Magento multi stores.

Need assistance with your Magento store? Turn to BelVG for Magento custom development.

magento development services

Magento Development

Take your online store to the next level with BelVG development

Visit the page
Igor Dragun
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Igor

4 Comments

  1. It’s our pleasure! Check on our blog regularly for new Magento articles!

  2. All the mentioned steps are well clear and it’s easy to implement.

    Thanks for sharing this comprehensive guide.

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *