How to set multiple websites with multiple store views in Magento

07 Dec

Let’s say we want 2 websites with same admin panel.

Here’s procedure:

1) Add New Root Category For New website. eg. say we want create website name as new_website and create new root category name as root_new_website

2) In admin panel, go to System->Configuration and click on “Manage Stores”
Click on Create Webstie button make a new website name “New Website″ or however you want to call it. (I’ll call mine New Website for the purposes of this article).
In “code” field there, write something like “new_website″.

3) Click on “Create Store” button. Make a new store for website By select Website name as New Website. Give store name same as website name “New Website“. Select Root category for this website “root_new_website”.

4) Click on “Create Store View”  Button and Select Store name from dropdown “New Website“. give store view name as “English” and give code as “new_website_eng”. make status Enabled and save it.

Ok, let’s say we want url to be handled this way:


5) In your Magento installation directory, make new directory called “new_website”.

Copy .htacces and index.php from your root directory in new_website.

In .htaccess search for “RewriteBase /” line and replace it with “RewriteBase /new_website/” in new_website directory.

6) In new_website directory open index.php and change “$compilerConfig = ‘includes/config.php’;” to
$compilerConfig = ‘../includes/config.php’;

Change $mageFilename = ‘app/Mage.php’; to $mageFilename = ‘../app/Mage.php’;

In same file make sure to edit Mage::run() function for each site:

Mage::run(‘new_website′, ‘website’);

7) Go to System->Configuration and select Current Configuration Scope: New Website

Set Base Link URL in unsecure and secure tab as {{unsecure_base_url}}new_website/

Now finally enter in url.

This is done.

If you want create more website in different language visit this link



Leave a comment

Posted by on Dec 7, 2011 in Magento


Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: