Magento Expert Forum - Improve your Magento experience

onet connect
Results 1 to 2 of 2

How to setup Magento multiple stores

  1. #1
    Junior Member Michelle_Magestore's Avatar
    Join Date
    Jun 2013
    Thanked 6 Times in 6 Posts

    Default How to setup Magento multiple stores

    Today I’ll explain how to setup multiple stores with different domains in a single installation of Magento.

    Step 1: Add new root category for new store.

    Go to Catalog > Manage Categories then click on “Add Root Category” to create new root category for each website. You set it to active and anchor.
    Name:  1.jpg
Views: 6
Size:  49.2 KB

    Step 2: Create new website and store

    Go to “System–>manage stores” to create new websites, new stores and new store views
    Name:  2.jpg
Views: 6
Size:  51.2 KB
    Name:  3.jpg
Views: 6
Size:  15.8 KB
    Name:  4.jpg
Views: 6
Size:  58.9 KB
    Name:  5.jpg
Views: 6
Size:  17.4 KB

    Step 3: Set template for new website

    Go to “system–>configuration” then choose the new website in “store select”, afterwards click on “Design” tab.
    Step 4: Edit index.php

    The most important part is: editing the content of index.php file. Open the file and find the following line at the bottom of file:

    Comment this line and add some new lines:

    switch($_SERVER['HTTP_HOST']) {
    //second website
    case '':
    case '':
    Mage::run('second_website_code', 'website');
    //another website
    case '':
    case '':
    Mage::run('another_website_code', 'website');
    //main website

    To customize this code to meet your own needs, just replace the domain names with your required domains, the website codes with your own website codes (in this example it’s the second_website_code

    Mage::run('second_website_code', 'website');

    I hope this helps!

    Magestore has released Magento Quick Login extension which helps Customers quickly log in by displaying a popup right below top links like Login, My account, etc. Specially, Magestore is offering the special pricing for this extension. Price starts at $29 and will increase $5 each day until reaching the normal price of $49. 1 day left to buy at $29. Buy now to enjoy the best price!

    View more threads in the same category:

  2. #2
    Junior Member Kathy Daunt's Avatar
    Join Date
    May 2013
    Thanked 4 Times in 4 Posts


    Thanks for this detailed explanation this might help so many newbies and readers. There is also one more source for it to set up multi-websites on your Magento store. Please read:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts