Video: Creating Multiple Online Storefronts (Part 1)

In this video we showcase one of the more powerful Magento features, the ability to manage multiple Online storefronts from a single administration panel. This functionality allows an online merchant to centrally manage all facets of a business from one location, while selling through multiple online stores.

The first video goes through the basics of creating a completely separate website within the Magento installation, to be controlled from the same admin.  Below are the necessary steps to do this, carried out and recorded on the 0.9.17740 version of Magento:

  • Step 1:  Creating a new folder for second website, copying index.php and .htaccess, necessary change of code to index.php
  • Step 2:  Creating a new root category for the second website
  • Step 3:  Creating the website in the admin, along with a store and store view
  • Step 4:  Configuring the URL structure of the new site
  • Step 5:  Adding categories and products
  • Step 6:  Associating products with the new website

At the end of the video, the logo of the new website is updated and the homepage is set to a different admin-created CMS page.

Please note:  This demonstration uses and some symlinks to make the URLs more readable.  You may notice the url of the second website switching between and - this is why.  In a live environment each site will most likely have its own IP, so different domain names could be configured accordingly.

This is Part 1 of 2 videos showing Multiple Websites/Stores.  Part 2 will go into more detail about store views and multiple stores under the same website.


RSS comments feed for this entry

User Comments

  1. dell

    1dell |posted March 20 2008

    Impressive and needed, since it’s a major change from previous method.  When can we expect the 2nd video on administering multiple stores within the same website to be available?

  2. johannes

    2johannes |posted March 20 2008

    Dell - the 2nd video should be up there by the end of the day on Friday.

  3. nafnaf1000

    3nafnaf1000 |posted March 20 2008

    when i change the store THEM from “default” i get this error…

    any idea?

    exception ‘Mage_Core_Exception’ with message ‘Invalid store requested: “default”.’ in /home/hbaetcco/domains/
    Stack trace:
    #0 /home/hbaetcco/domains/ Mage::throwException(’Invalid store r...’)
    #1 /home/hbaetcco/domains/ Mage_Core_Model_App->getStore()
    #2 /home/hbaetcco/domains/ Mage_Core_Model_Url_Rewrite->rewrite()
    #3 /home/hbaetcco/domains/ Mage_Core_Controller_Varien_Front->init()
    #4 /home/hbaetcco/domains/ Mage_Core_Model_App->_initFrontController()
    #5 /home/hbaetcco/domains/ Mage_Core_Model_App->getFrontController()
    #6 /home/hbaetcco/domains/ Mage::run(’default’)
    #7 {main}

  4. adimagento

    4adimagento from Los Angeles, CA|posted March 20 2008

    @nafnaf1000 - the blog comments are not the place for technical questions and pasting code. Please use the forum in the future.

  5. magentocommerce

    5magentocommerce |posted March 21 2008

    Will this bulk stores share customers informations?
    I think there have two kinds mult stores. One is same domain another is use several domains.How control several domains in one admin?
    there have another interesting confunction,Like allow customers sell their goods on your store.If this kind confunction possible?

  6. johannes

    6johannes |posted March 21 2008

    To set up multiple domains you would follow the same steps as are in the video above.  I just didn’t have multiple domains at my disposal when making the video smile

    If you wanted for example “” you would redirect this domain to the “shoestore” directory that we created in the video.

    Customer accounts can be shared globally, or per website.  You can configure this from System -> Configuration -> Customers Configuration -> Account Sharing Options.

  7. agcilantro

    7agcilantro |posted March 21 2008

    Thanks for the video.
    Do the additional directories for the additional stores have to be anywhere specific, i.e., inside the Magento folder or directory where the main site was installed on the server?
    Also, is it possible to have different pricing on each of the different stores, for instance a wholesale store, a retail store and a consumer store?

  8. radders

    8radders |posted March 29 2008

    As far as I can tell it is not possible to set pricing at the store level as this is showing up as global. You can of course have different pricing for different customer groups so you could have a wholesale customer group across all stores. From what I read (haven’t tried it yet) it is possible to set different pricing and delivery methods at the website level so this would seem to be the answer for setting up a wholesale store.

  9. radders

    9radders |posted March 29 2008

    Correction to my earlier post - discovered this post:
    Prices scope can be changed in configuration. Please go to admin -> System -> Configuration -> General -> Price -> Scope

  10. nate_02631

    10nate_02631 |posted April 1 2008

    Forgive the ignorant question (?) and I think I may know the answer based on what I read/saw, but could a web dev potentially have a single install of Magento and then set it multiple stores for clients based off that one install.

    From what I’ve seen it is possible to
    a. have different stores at different domains, with different looks
    b. have different products/price sets for each of the stores

    But could the stores basically be isolated, with permissions, etc… so that a store owner could maintain their store in complete isolation from the others (i.e. no sharing of attributes, customer info etc...)? Would they run of the same database?

  11. johannes

    11johannes |posted April 1 2008

    @nate_02631:  Multiple websites under one magento installation will still share one admin panel - meaning, orders from all websites will show up in the ‘sales’ module… all customers will show up under ‘customers’.  And yes, as far as I know they will run off the same database.

    To best accomplish what you describe, I would think multiple Magento installations are required.  The separation of data between websites is to keep track of front-end activity - if you run a lingerie store and a gun store you might not want customers accounts and order information to be shared between them wink

  12. quark

    12quark from Romania|posted April 20 2008

    1. I want to know if a client can have one chart and one checkout for all stores within one website or he must checkout from each store.

    2. What about different stores on different websites? One chart and one checkout or multiple charts and checkouts from each websites?

  13. stretchr

    13stretchr from Georgia, USA|posted May 2 2008

    In the video, for the step where you change the index.php from:



    In my “index.php” the code is:


    (Note no ‘default’)

    Would I follow the same editing step, even though there was no “default” in there initially?


  14. stretchr

    14stretchr from Georgia, USA|posted May 2 2008

    Oops. Sorry. Will ask in the forums.


  15. freshwebservices

    15freshwebservices from Leicestershire, UK|posted May 28 2008

    Sorry for such newbie questions ... but here goes. Will Magento cope with the following scenario

    1) Multiple stores on the same server with unique urls - main store =, other stores =,, etc. - each one being a separate folder off the root directory.
    2) Each shop shares 1 shopping cart/checkout - ie, if I buy from then the sale details will be available to admin of the main store but the customer will get invoice from not, etc?
    3) In this scenario, would one SSL certificate suffice for all the shops or will I need one for each separate domain (ie,,, etc).
    4) Similarly, will each domain require its own IP address?
    5) How many different sites can Magento run without performance problems? My client has c.100 separate sites that he wants to manage from a central admin & single shopping cart site ala Magento.

    Thanks in advance for your time & help,

  16. DaveAllen

    16DaveAllen |posted June 3 2008

    The questions that “freshwebservices” asked are almost exactly the same as I was going to ask here so I also look for these answers!


  17. rapado

    17rapado from 85354 Erding / Bavarian / Germany|posted June 30 2008

    Hi @johannes,

    your videos are great but I didn’t understand how to setup multiple stores on multiple different URL.
    When you don’t have multiple different URL to your disposal, could you describe the way in a text description ?


  18. thE_iNviNciblE

    18thE_iNviNciblE from Oldenburg|posted July 16 2008


    again a quite nice magento screencast grin

    go on boys n girls wink


    does it matter which URL it is ?
    you can chosse the same domain with a subfolder…

  19. magento-neil

    19magento-neil |posted August 7 2008

    In this scenario, does each store get its own checkout?

  20. wildwisconsin

    20wildwisconsin |posted September 4 2008

    This seems to not work when “batch” adding products to the new store front.

    I already have XXXX products in the system already and don’t want to go thru each of the individually to enable them to the new site. So from MANAGE PRODUCTS I select everything, and Update Attributes to enable them into the new store, but they don’t show up until I open each product up manually and add the new website again and choose the “Copy Data from: Default Values” selection.

    Is there a way to do this by batching? or did I do it wrong?

  21. wildwisconsin

    21wildwisconsin |posted September 4 2008

    It seems to me that it would work if “Copy Data from: Default Values” would show up when selecting the website on a batch attribute upload from the Manage Products.

  22. edg1

    22edg1 |posted October 2 2008

    Please explain how to set the different url’s for different websites!

    I’ve tryed to redirect it but then you go the the other url/directory
    is there a way to keep it in the initial different url.
    Please help out!
    kind regards,

  23. Winkelman

    23Winkelman |posted October 12 2008

    Really impressive, great possibilities for webshop owners. But we need to study and learn.

    Best Regards

  24. edg1

    24edg1 |posted October 13 2008

    OK i’ve found it!
    When you want to add different urls its quit easy you just have to change the link url into the url you want and then add addon in your mail shop setup-url.
    in this folder you add a new index file changed it to point to the new website.
    and that should work fine!

  25. thE_iNviNciblE

    25thE_iNviNciblE from Oldenburg|posted October 13 2008

    thats it…

    maybe a problem with “open base dir restriction” happens… but this could be fixed with manual editing of the apache conf....

    it’s quite simple to change the complette store-url ... or do subdomains and so on ... grin

    thumbs up grin

  26. Thejosh13

    26Thejosh13 |posted November 8 2008

    "I just didn’t have multiple domains at my disposal when making the video”

    you gotta be kidding me

  27. Steve J

    27Steve J |posted January 24 2009

    I’m new to all of this. I’ve looked for several hours at the features of magento because I want to replace an existing site.  My mall site is for small mom and pop type store owners who either don’t know how to set up an online store or cannot afford to. I do not want to get directly involved with their transactions but only supply them with an inexpensive way to be on the internet.  The features I am looking for: Multiple storefronts for independant merchants, separate cart for each storefront with independant merchant accounts.  Everything that I have seen looks great, just not an everyday web site builder and could not tell if this is how the script is set up.
    Thanks, Steve in cold Ohio

  28. freshwebservices

    28freshwebservices from Leicestershire, UK|posted January 24 2009

    Hi Steve,
    I don’t think Mage multiple stores is what you are looking for - it doesn’t mean that you can manage multiple, completely separate websites, each one linked to a separate client, each with a separate login, separate customer database, etc, etc from the one install of Mage.

    Rather, multiple stores refers to the ability of a web store owner to set up ostensibly separate websites - say, one store for brand X clothers, another for brand Y clothes etc, but sharing a common checkout, customer database, etc. Have a look at for an idea of the concept.

    At least, that’s how I’ve understood it!


  29. Steve J

    29Steve J |posted January 24 2009

    Thanks Eddie, The script I have been looking at is iBotique by NetArt media (  It uses one primary database but individule php index script files for each vendor to operate the individule stores.  Everything is controlled by a main administrator with limited administrator control for each vendor to maintain their stores.  It’s an all right script, more than I wanted to pay and it lacks many of the features in magento.  I was just hoping to have more control over the front end look and operation of the script.  I appreciate your imput.

    Thanks again....Steve

  30. CalinT

    30CalinT |posted February 5 2009

    First define your websites and stores under System -> Manage Stores and then, provided you already parked your second domain ( on top of the main domain (

    you will have something like:

    WebsiteName   WebsiteCode
    website1         web1code
    website2         web2code

    // web1code is usually ‘base’

    Then edit System -> Configuration -> website1 -> Web tab and :
            set {Base URL}        to your
            set {Base Link URL} to your

    Then edit System -> Configuration -> website2 -> Web tab and :
         set {Base URL}        to your
         set {Base Link URL} to your

    Then edit index.php under the root folder of you maindomain and change:

        Mage::run(’base’, ‘website’);


    switch ($_SERVER[’HTTP_HOST’]){
        case “”:
        case “”;
            Mage::run(’web2code’, ‘website’);
           // where web2code is the code of your second website from under manage Stores -> Edit Website

           Mage::run(’web1code’, ‘website’);

    That’s it! No add-on domains required. I have successfully handled this way 3 secondary domains (parked on top of the main domain) each featuring slightly different product catalog.

    P.S. The only thing I don’t like about this set up is the img href’s, css href’s and so on point to for all secondary websites

    Good luck.

  31. Kim S

    31Kim S |posted March 8 2009

    @CalinT This is amazing. Works like a charm. Infact I have, and setup and it works correctly.

    I havent tinkered with CSS etc ... just wanted to try the subdomains instead of primary domains. Thanks for the help.

  32. MagentoSepcialist

    32MagentoSepcialist |posted April 10 2009

    HI every body I have a question .

    I have set up Multi Domain Website and its working fine but my question is as follows

    I register as a user on Domain A
    I want to use the same details of Domain A to Log into Domain B but it refuse and say user not found where as both the domain A and B are running on behind same Magento Application . 

    Can Any one Guide me how to make this possible that is User of Domain A logins to Domain B with the same details


  33. lakanat

    33lakanat |posted April 21 2009

    quelqu’un a t’il une reelle information complete a fournir pour installer un multiwebsite multidomaine avec magento ?

  34. lakanat

    34lakanat |posted April 21 2009


    anybody have a really and runing solution to install multi website ?


  35. Hugoto

    35Hugoto |posted June 8 2009

    the video is so outdated so I can’t even reproduce the steps…

    pls how to do this with the actual version of magento?

  36. Cyber Coder

    36Cyber Coder |posted June 8 2009

    Hello Hugoto
    I can set up your multi store and guide you contact me



  37. Phillip Smith

    37Phillip Smith from Toronto, ON., Canada|posted June 25 2009

  38. Phillip Smith

    38Phillip Smith from Toronto, ON., Canada|posted June 25 2009

  39. CalinT

    39CalinT |posted June 25 2009

    @Kim S - Thank you for your apreciation. I’m delighted to see that my post helped somebody. 

    Although I think my post is self explanatory I welcome an questions. Just post the question under this thread and I’ll do my best to answer it.

  40. CalinT

    40CalinT |posted June 25 2009


    Although I don’t see a reason for loggin in to multiple domains , you may try to play with mySQL table “customer_entity” and duplicate the records while changing the website ID field. Not sure it wors, but it should. grin Not an “up front” solution though, I realize that.

  41. dhamsi

    41dhamsi |posted August 7 2009

    how i can see two domains in localhost which share the same database

  42. johnashleys

    42johnashleys |posted September 9 2009

    Please explain how to set the different url’s for different websites!
    I’ve tryed to redirect it but then you go the the other url/directory
    is there a way to keep it in the initial different url???

    download movie free

  43. thE_iNviNciblE

    43thE_iNviNciblE from Oldenburg|posted September 17 2009

    --> => 2008-09-26 11:49:11 -> nearly 1 year later.... the spam bots are learning about magento submit forms…

  44. aneguitar

    44aneguitar from Greece|posted September 28 2009

    Do I also need to create, in the index.php file, symbolic links to point to a few directories??
    o ln -s ../magento/404 ./404
    o ln -s ../magento/app ./app
    o ln -s ../magento/includes ./includes
    o ln -s ../magento/js ./js
    o ln -s ../magento/media ./media
    o ln -s ../magento/skin ./skin
    o ln -s ../magento/report ./report
    o ln -s ../magento/var ./var
    o ln –s ../magento/lib ./lib

    I am asking this because at the fooman Speedster extension it says that I have to.
    But when I put these symbolic links in the file then the site stops working and it gives me an error:
    (Parse error: syntax error, unexpected ‘/’ )

    This is in the installation guide at the Fooman Extension:

    Thank you very much!

  45. PescaraZanni

    45PescaraZanni |posted September 28 2009

    but this video is a fake… it doesn’t work with last magento version

  46. freshwebservices

    46freshwebservices from Leicestershire, UK|posted September 29 2009

    That’s a bit harsh!

  47. Martinlee

    47Martinlee |posted October 6 2009

    thanks alot for sharing.

  48. micksay

    48micksay from Canterbury|posted October 15 2009

    Hi All - I hope you are all well.

    Magento really rocks, well done guys and gals. However.....

    I think I must be a bit thick as a I cannot get my head round this.

    I have:

    Website. 2 stores. 2 store views.

    website =

    Store 1. on blue theme with product and customer database etc.

    Store 2. I want to create a consulting section with modern theme. I have set up the skeleton store & theme.

    Now. I own another domain called and I would like my “store 2” to be reachable when some one types into a browser. And to all intents and purposes the site visitor will be in and this will be reflected in the address bar.

    Also if I am doing a mail out I would like to direct prospects to either: or

    Now I have a headache… grin

    Can some one please help me (in thick bloke terms) how to do this please??

    Thanks a million


    Store 2 =

  49. micksay

    49micksay from Canterbury|posted October 15 2009

    PS::::: I Aim to abandon the origonal www salon-advice and rebuild this site inside my Maganto store as store 2…



RSS: This Entry| All Blog Posts (RSS)