10 min read

Magento 2 Multi Store Setup In 5 Steps [Beginner’s Guide]

Set up your Magento 2 multi store in 5 steps with our beginner’s guide and dive into the benefits Magento offers.

Dark Mode

Does your e-store fall short of the mark as your business grows?

With Magento’s multi store capability, you can take control of your digital expansion.

In the words of American actor Milton Berle: “If opportunity doesn’t knock, build a door.”

By creating a Magento 2 multi store, your business can reach new markets and boost sales without seeing costs soar.

Discover our step-by-step guide to creating multiple Magento stores and websites, as well as the benefits they can bring your online business.

Have a Magento project? Digital Silk builds custom e-stores. Request a Quote

What Is A Magento 2 Multi Store?

A Magento 2 multi store is a feature that allows eCommerce businesses to manage and operate multiple online stores from one admin panel, or dashboard.

This gives business owners the opportunity to create unique online experiences, adapting anything from design to pricing, products to integrations, without the hassle of maintaining numerous independent websites.

Magento multi stores can be used to cater to different target markets, languages or product lines while maintaining backend organization and inventory management.

Magento 2’s Platform Hierarchy

Magento 2’s platform hierarchy is an essential aspect to understand if you’re looking to set up a multi-store environment.

Each ‘global’ single installation includes three layers of customizable entities, providing the opportunity for multiple websites, stores and store views under one roof.

How does this work?

When configuring a setting, you’ll decide the scope at which it is applied, choosing from four levels of hierarchy:

  • Global: Top-end, system-wide settings and resources available throughout installation that are applied to your account
  • Website: Settings and resources limited to a single website that has at least one default store
  • Store: A child entity of a website with its own settings, resources, main menu (root category) and default store view
  • Store view: The lowest level in the hierarchy and generally used for different versions of the same store, usually for localization purposes
A graphic highlighting Magento's four levels of admin hierarchy
[Source: Adobe]

How To Set Up A Magento Multi Store In 5 Steps

The route to a multi store Magento setup can be split into five simple steps. Your decision on each step will determine the scope of your store, how it aligns with the rest of your website and how it is viewed in both the backend and frontend.

Learn how to set up a Magento multi store below:

1. Choose Your Store’s Domain

The URL structure of your stores can be adapted to your preferences. For a Magento 2 multi store project, there are two key options to choose between:

  1. A shared domain with a different slug, or path:
    • domain.com/store1
    • domain.com/store2
  2. A unique subdomain of the primary URL:
    • store1.domain.com
    • Store2.domain.com

As with the entire multi store journey, planning your domain structure before you start helps to create a fully optimized user experience (UX) with seamless navigation.

Looking for expert recommendations on your e-store? We are Magento development specialists. Meet Our Team

2. Create Your Store

With your domain structure decided, it’s time to create your store. This can be done in four short steps:

  1. Click Stores in your admin panel’s menu, then go to settings and select All Stores.
  2. Click Create Store.
  3. Fill in the following details:
    • Web Site: The website the store belongs to. If you only have one, select main website.
    • Name: A reference name for your view only.
    • Code: A reference code for servers; e.g., mystore.
    • Root Category: Your store’s main menu layout. If not yet created, select ‘default category.’
  4. Click Save Store.

3. Create Your Default Store View

Your Magento store view relates to the way customers will see your eCommerce store’s interface and information.

Rather than creating two separate stores for different currencies or translations, by adding multiple store views you provide users the opportunity to personalize their experience while staying on the same store.

Creating your store view is a similar process to your store:

  1. Click Create Store View.
  2. Fill in the following details:
    • Store: Your newly created store
    • Name: A reference name for your view only
    • Code: A reference code for servers; e.g., dollars
    • Status: Set to enabled
    • Store Order: Number of relevance when in a list
    • Store View Flag: The country your store view will target
  3. Click Save Store View.

4. Configure Your Store’s URL

With your store and store view established in the backend, you’ll need to configure the store URL to connect them to your chosen domain.

Here’s how:

  • Return to your admin panel, click Stores in the menu, go to settings and select Configuration.
  • Click Web on the left-hand side under the General drop-down.
  • Choose your scope by selecting the drop-down in the top left, click your new Store View, then click OK.
  • Expand the Base URLs section, make sure the fields are unchecked and add your store’s URL.
  • Expand the Base URLs (Secure) section and repeat.
  • Click Save Config.

5. Configure Your Server

At this stage, your Magento 2 multi store journey is complete in the backend. But to make your multi store available to external users, you need to configure your server.

Unfortunately, this is one of the complex Magento online store development aspects.

The server configuration works by passing the values of the MAGE_RUN_TYPE (website or store) and MAGE_RUN_CODE (its corresponding website or store view) variables to the web server via a virtual host.

How to do this depends on whether you use your root file directory, Apache web server or Nginx web server:

a. Root Directory

To configure in the root file directory, or magento-vars.php file, follow these four steps:

  1. Open the magento-vars.php file in a text editor.
  2. Move the if block below the function block.
  3. Replace the values of the if block with your unique codes:
    • example.com: The base URL of your website
    • default: The unique code for your website or store view
    • store: The website or store view your wish to load
  4. Save your changes to the magento-vars.php file.

b. Apache

To configure with Apache, follow these six steps:

  1. Using your root user privileges, open the virtual host configuration file in a text editor.
  2. Find the section starting with <VirtualHost *:80>.
  3. Create the new virtual host by adding code with the following valued under any existing virtual hosts:
    • ServerName: URL root
    • DocumentRoot: The folder where files are stored
    • SetEnv MAGE_RUN_CODE: Your store code
    • SetEnv MAGE_RUN_TYPE: Your website code
  4. Save your changes to httpd.conf and exit the text editor.
  5. Restart Apache:
    • CentOS: service httpd restart
    • Ubuntu: service apache2 restart
  6. Verify your site by:
    • Locating your operating system hosts file.
    • Adding the static route in the format: e.g., dollars.mysite
    • Opening the store URL in your browser.

c. Nginx

To configure with Nginx, follow four steps:

  1. Create the Nginx virtual host following Adobe’s detailed coding instructions.
  2. Pass the values of $MAGE_RUN_TYPE and $MAGE_RUN_CODE to nginx using the Magento-provided nginx.conf.sample:
    • $MAGE_RUN_TYPE is either your store or website.
    • $MAGE_RUN_CODE your store view code corresponding to your selected $MAGE_RUN_TYPE.
  3. Update the Base URL configuration in your Magento admin panel, as shown in step four above.
  4. Verify your site by:
    • Locating your operating system hosts file.
    • Adding the static route in the format: e.g., dollars.mysite
    • Opening the store URL in your browser.
Need support planning your Magento store? Tell us about your project and get a custom quote. Schedule A Consultation

How To Set Up Multiple Magento Websites In 3 Steps

Setting up multiple stores under one website is a useful tool in harnessing flexibility and scalability for a single or connected brands.

But what if you have multiple operations with different checkout processes and requirements?

The Magento 2 multi site functionality allows for the creation of multiple websites that are unconnected in the frontend but supported by the same backend dashboard.

The process is similar to a multi store setup, with fewer steps:

1. Create Your Website

Adding a website to your Magento account is a five-stage process:

  1. Click Stores in your admin panel’s menu, then go to settings and select All Stores.
  2. Click Create Website.
  3. Fill in the following details:
    • Name: Your website’s domain.
    • Code: A reference code for servers; e.g., mysite.
    • Store Order: Number of relevance when in a list.
  4. Click Save Web Site.
  5. Add stores and store views to your new site in by following steps two and three above.

2. Configure Your Store’s URL

Unlike configuring your store URL for a pre-existing website, store URL configuration for a new site is a multi-step process that requires the technical expertise of experienced Magento developers.

An overview of the steps can be seen below:

  1. Use a secure protocol
  2. Configure the base URL
  3. Configure the secure base URL
  4. Include the store code
  5. Troubleshoot the URL
  6. Use a custom admin URL
  7. Restore the default Admin URL and Admin path

3. Configure Your Server

Configuring your Magento website to your server requires the same process as the Magento 2 multi store server configuration.

This means using coding to pass the values of the $MAGE_RUN_TYPE and $MAGE_RUN_CODE variables to your root directory or web server, whether Apache or Nginx.

As with Magento multi store server configuration, the server you run impacts the required steps. We recommend enlisting the support of an eCommerce development agency to ensure your new site is successfully pushed live.

Do you have a Magento project? Tell us your goals and get a custom quote. Set Up A Consultation

Benefits Of A Magento Multi Store

We’ve all heard of Magento’s famed flexibility. It’s one of the reasons many business owners choose Magento over Shopify or WordPress (and WooCommerce) as their brand’s eCommerce platform.

But what are the exact benefits of using Magento’s multi store capabilities for your business?

1. Expand Your Reach & Diversify Into New Markets

Magento is a global eCommerce platform, with active websites in 137 countries.

However, by setting up multiple stores within one Magento installation, there’s no need to build new operations to prioritize local usability and enhance global scalability.

With a Magento 2 multi store, you can:

  • Customize languages
  • Customize currencies
  • Customize payment & shipping methods

2. Offer Market-Based Products & Pricing

One study found that a Starbucks tall latte costs $7.17 in Switzerland, while the same drink will set you back just $1.31 in Turkey.

The global coffee giant has adjusted their pricing to meet localized expectations and drive demand at every store.

Just like Starbucks, Magento’s multi store capability allows your business to segment and diversify your product portfolio by region, market or audience to maximize sales.

With a Magento 2 multi store, you can:

  • Restrict product categories, items & extensions per shop
  • Build a separate catalog for each shop
  • Have separate checkouts and prices for various shops

3. Limit Costs & Harness Connectivity

Hosting alone can cost your eCommerce business thousands of dollars a year. For example, Cloudways’ most premium package costs $241.62 a month, while Nexcess charge $195 a month for their managed Magento hosting plan.

And this is just one of the many costs that come with running an online store.

By connecting your digital infrastructure, your business can reduce costs related to the online management of your brand, like your hosting plan.

With a Magento 2 multi store, you can:

  • Use one single hosting plan and EV SSL certificate
  • Streamline tasks such as inventory management, order processing and content updates
  • Combine analytics and data reporting
Ready to start your e-store project with Digital Silk? Request a Quote

Build Your Magento 2 Multi Store With Digital Silk

Magento is a favorite for businesses with complex organizational structures or fast expansion plans because of its flexibility and adaptability.

The Magento 2 multi store capability is a prime enabler of this.

At Digital Silk, we have a team of senior-level digital strategists and development specialists to help plan your multi store structure and turn it into a reality.

In addition to accessing the latest eCommerce methodologies, technologies and approaches, by partnering with Digital Silk, your Magento project will benefit from our:

  • Project ownership: We take control of your process as if it were our own, acting from the driving seat and never shying away from your specific requirements.
  • Transparency: We involve you in every step of the journey, giving ample opportunity for QA and feedback.
  • Measurable results: We deliver results you can see, turning complex key performance indicators (KPIs) into tangible outcomes.

If you’re looking to diversify your Magento store, or start a multi store project from scratch, we’re on hand to help.

Contact our team online, call us at (800) 206-9413 or fill in the request a quote below to unlock your online store’s potential today.

Request A Quote For Your Magento Project
Tell us about your website goals and let our experts give you a custom proposal.

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

An image of Ljubomir, Ecommerce Development Director

Director of ECommerce Development

Ljubomir holds a Master’s Degree in Information Technologies and won the customer excellence award in 2015. He is passionate about utilizing the best eCommerce practices to build custom deliverables. For a decade, he has worked with leading commerce companies, including Diesel, Manfrotto, Vangard, Lowepro & Joby, Puma, Nili Lottan, Onlinestores, POC and others.

Categories (tags):

Related Resources

Top

2023 Digital Trends Guide

"*" indicates required fields

This field is for validation purposes and should be left unchanged.