Magento Multi Store

These are the basic instructions for setting up a Magento multi-store, where separate store fronts share the same back end.


Root category

  • In the Magento admin panel click on Catalogue → Manage categories
  • Click the Add Root Category button
  • Pick an appropriate name, e.g. Wholesale, and select Yes for "Is Active"
  • Click on the "Display Settings" tab and select Yes for ""Is Anchor"
  • Save the category

Website, store & view

  • Go to System → Manage Stores
  • Click "Create Website"
  • Enter and note the name and code, e.g. and wholesale, and click Save
  • Click "Create Store"
  • Select the new site in the drop-down box, choose a name, and click Save
  • Click "Create Store View"
  • Choose the appropriate store, enter values for Name and Code, e.g. Default wholesale view and wholesale_default, select Enabled under Status, and click Save


  • Go to System → Configuration
  • Change the Current Configuration Scope to the website name, e.g. ""
  • Click on Web under General on the left navigation
  • Under each of Secure and Unsecure, uncheck the Use Default checkbox and enter the URLs the new store will use - in this example and click Save Config

Switching store based on URL

  • Park the new domain in cPanel, or create a new name virtual host pointing to the same webroot / point the domain at the dedicated IP on a server without a control panel
  • Edit index.php and add
switch($_SERVER['HTTP_HOST']) {
case '':
case '':
$mageRunCode = 'wholesale';
$mageRunType = 'website';


Mage::run($mageRunCode, $mageRunType);

where wholesale is the code used when creating the website above.

  • 850 Users Found This Useful
Was this answer helpful?

Related Articles

Show out of stock products

To display products on the frontend that are out of stock: Log in to the Magento backend...

Magento upload httpd error

This error is most commonly seen when attempting to upload product images. Magento uses a Flash...

Configurable products

The basic steps to creating configurable products, e.g. shoes with sizing: Create the...

Getting started - resources

Building a Magento site can be a long and complex process, involving multiple designers,...

Setting up SSL in Magento

When SSL is enabled in Magento, the store automatically switches to a secure connection for...