India

ZestyBeanz Technologies Pvt Ltd 4th Floor, Nila, Technopark Thiruvananthapuram,
India – 695581
Phone: +91 471 4063254
Fax : +91 471 2700171

   .

ZestyBeanz Technologies Pvt Ltd
61/3236, Manikkath Cross Road
Ravipuram, Kochi, India - 682016
Phone: +91 484 4063254

  UAE

Zesty Labs
Office # 2003, Millennium Plaza Building
Sheikh Zayed Rd, Dubai, UAE
Phone: +971 4333 2222​
Mobile: +971-52-7553466

  Germany​

ZestyBeanz Technologies GmbH
Reuterstraße 1
90408 Nürnberg
Fon: +49 911 4801 444
Fax: +49 911 4801 445

Managing Multiple website stores in Magento

Contact Form


ajasin's picture

Managing Multiple website stores in Magento

In Basic Installation a magento has one website, one store and one store view. Here it is used for creating a single shop website.
To setup multiple website stores in magento there are a few configuration changes to be done in the backend. Mentioned below are the  instructions to be followed to create  multiple website stores in magento.

  1. Go to the magento admin panel. 
  2. Go to the "Catalog" tab, and select "Manage Categories." [Now you can see only one root category(Default category), This category is used for the first website store].
  3. Create new root category. This category named as "second_root_category" (This is used for the Second website Store).
  4. Go to the "System" tab and select "Manage Stores".
  5. Create New Website [Enter Second website name. Then enter code as "second"(The code value will be used later as mentioned in "Step 13". So don't forget the code value)].
  6. Create New Store (To create the Store for the Website, select second website from the dropdown. In "Name", we'll enter Second Store. In "Root Category", select the "second_root_category" from the dropdown ).
  7. Create New Store View (For  "Store", select the scond store from the dropdown. In "Name", fill second store view. In "Code",  fill value "second". In  "Status", select "Enabled" from the dropdown).
  8. Change Link URL in Configuration.
    > Go to "System" tab and select the "Configuration"
    > Change "Current Configuration Scope" to "Second Website".
    > Select "Web" from the sidebar on the left under the "General" heading.
    > Edit the Unsecure tab uncheck the Use default box "Base URL" and "Base Link URL".
    > Enter Base URL is "http://yourwebsitename/".
    > Enter Base Link URL is "http://yourwebsitename/second/".
    > Save Configuration.
     
  9. Create a new folder named "second" inside 'magento' folder
  10. Copy 'index.php' of magento folder into "second" folder.
  11. Change $compilerConfig = 'includes/config.php'; to $compilerConfig = '../includes/config.php';
  12. Change $mageFilename = 'app/Mage.php'; to $mageFilename = '../app/Mage.php';
  13. Change Mage::run(); to Mage::run('second','website') {Please refer Step 5};
  14. Copy .htaccess file from magento folder to "second" folder.

Finally, you have setup a multi website for your magento shop. Your base magento installation  can be browsed by "http://yourwebsite/" and your second website can be browsed by "http://yourwebsite/second/".  

Carlos's picture

Hi guys, Best post ever I was

Hi guys,
Best post ever I was looking for this for a couple of days, working now :)

Q: mywebsite.com/second/ works nice and smooth. How can I turn mywebsite.com/second/ into mysecondwebsite.com?

Any help would be really appreciated.

Thanks in advance.

Manikandaprabu's picture

Hi, I am using Magento

Hi,

I am using Magento 1.7.0.2

I done multi store successfully.

But product images are not showing in 2nd website.

When i add new product images in admin panel. It only shows main store.2nd store images not showing.

i have searched many forum.but not have a solution.kindly help me.

Susan's picture

Great tutorial. Thank you,

Great tutorial. Thank you, however in Magento 1.7.0.2, the index.php is changed a bit, so Steps 11 to 13 have to be rewritten. These 3 steps copied from your tutorial are:

11.Change $compilerConfig = 'includes/config.php'; to $compilerConfig = '../includes/config.php';
12.Change $mageFilename = 'app/Mage.php'; to $mageFilename = '../app/Mage.php';
13.Change Mage::run(); to Mage::run('second','website') {Please refer Step 5};

In index.php, however, we now have the following corresponding lines:

define('MAGENTO_ROOT', getcwd());

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';

and

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';

and

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

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

I am rather unsure of how to apply the modifications here! Could you kindly update the tutorial for the latest version of Magento please?

Thank you again.

Paulo's picture

I'm testing on windows 7 with

I'm testing on windows 7 with wamp server.
I installed Magento 1.7.0.2

You need to change:

$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
for
$compilerConfig = '../includes/config.php';

$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
for
$mageFilename = '../app/Mage.php';

Mage::run($mageRunCode, $mageRunType);
for
Mage::run('second', 'website');

You can see this video. It's an old version, but only index.php is quite different:
http://www.magentocommerce.com/magento-on-the-fly/multiple-sites/

Vivek's picture

Thank You Very Much

Thank You Very Much ......

This article is very helpful for me. I got success to create the multiple website.....

cemmac's picture

Having followed this

Having followed this information above, the second site does not work at all....

I will try and find correct information in relation to having dual sites.

thanks for the effort ... but if you are reading this look else where for info

cemmac

ajasin's picture

Hi Cemmac, Sorry for the

Hi Cemmac,

Sorry for the late reply. I would like to know whether "Managing Multiple website stores in Magento" issue was resolved. If not let me know with more details.

Thanks

Ajasin

Anonymous's picture

Hi, i need one help, how to

Hi, i need one help, how to create user and give permission based on multi website in magento. and also if i login as admin using webiste url it redirect to base url of default config

Gopi's picture

I have followed following

I have followed following changes as you said. But css and js file takes current store path

keysersosa's picture

same here, second store does

same here, second store does not show up. running the index.php ends up showing the base website.