How to set multiple websites with multiple store views in Magento

Featured Image

If you work with Magento, sooner or later you will end up needing multiple websites that have
multiple languages.
Most of you know this, but I hope someone will still find this post useful.

There are few ways of doing same thing, but in my experience way I’m going to present now causes
less problems even though it is less automatic than some other ways.

Let’s say we want 2 websites and 2 languages for each site.

Here’s procedure:

In admin panel, go to System->Configuration and click on “Manage Stores”
Click on “Main Website” to change it’s name to “Website 1” or however you want to call it. (I’ll call mine “Website 1” for the purposes of this article).
In “code” field there, write something like “website_1”.

Do same for “Main Website Store”. Call it “Website store 1”.

And guess what… do same for “Default Store View” that you can find on same interface.
How to call it?
Hm… I’ll call mine “English Store View”
I’ll write “english_store_view_website_1” in “code” field there.

Ok, let’s go make second one…
Add website named “Website 2” with code “website_2”.
Add store called “Website store 2” and assign it to Website 2 that you can chose from dropdown.
Add new store view called “English Store View” with code “english_store_view_website_2” and
assign it to “Website 2” that you can find in dropdown.

By now you should have 2 websites with 1 language each.

Add two more store views.
Call first “German Store View” with code “german_store_view_website_1”.
Call second “German Store View” with code “german_store_view_website_2”.
Assign them to corresponding websites.

Let’s see what we have at this moment:

1) a) Website 1 (code: website_1) – Website Store 1 English Store View (code: english_store_view_website_1)
b) Website 1 (code: website_1) – Website Store 1German Store View (code: german_store_view_website_1)

2) a) Website 2 (code: website_2) – Website Store 2 English Store View (code: english_store_view_website_2)
b) Website 2 (code: website_2) – Website Store 2German Store View (code: german_store_view_website_2)

Of course, I didn’t mentioned that you will need to chose root category for your stores, do what ever you like there.

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

In your Magento installation directory, make 2 directories called “website_1” and “website_2”
Copy .htacces and index.php from your root directory in each of those new directories.

In .htaccess search for “RewriteBase /” line and replace it with “RewriteBase /website_1/” in first directory, and
search for “RewriteBase /” line and replace it with “RewriteBase /website_2/” in second directory.

In both directories 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(‘website_1’, ‘website’);
Mage::run(‘website_2’, ‘website’);

Go to System->Configuration and select Current Configuration Scope: Website 1

Set absolute paths to your skin, js and  media directories and set Base URL =  (do that for website_2 too)

Now use this dirty way to switch between websites :)

Since there is much to say about this subject, feel free to ask questions and I’ll try to answer them asap.

Developers Paradise 2016 - find out more

About Tomas Novoselic

Team Leader/Backend Developer

At Inchoo, Tomas is a Team Leader and Certified Magento Developer who handles Magento modifications at any level. He also works closely with clients on Magento projects of any size and difficulty.

Read more posts by Tomas / Visit Tomas's profile


  1. Hi!
    I have set up a second website with one store and two store views (for two languages).
    The second website requires lower prices than the first. The problem I am facing is, that I am only
    able to set a price per store view, that means in order to assign a different price for website two I will
    have to do it twice as I can’t select the website scope in order to have the price change affect both
    store views.
    I have change the config setting for catalog price scope from global to website.
    I have tried to run the second website on a different root catalog or on the same as the first one to
    no avail.
    Is this supposed to work like that?


  2. Is there any way to setup extensions for multi store sites ? Like enable extension for 1 site and disable for another.

    1. If you want to disable an extension simply go under system > configuration > advanced. Select your store and disable the extension you don’t want.

  3. Hi!
    I Have my shop in 2 languages, but i cannot seem to change a few of the details on the site in the second language which is Romanian. For example in the menus I don’t know how or where to change the “wiev all” text to the romanian version “Vezi tot”

  4. Hi,

    I’m already setting my site follow by your tutorial, but i’m get

    ../app/Mage.php was not found

    on my second website. May i know what did i do wrong?
    Hope to hear from you.


  5. Uhm… my question is: I have 1 website, with N different stores (a main website and N – 1 stores which display a subset of categories/products of the main website), each store has 4 languages.
    So, let’s say I have STORE_MAIN and STORE_SUB_1, and each store has VIEW_ENG, VIEW_FRA, VIEW_DEU. Now, on STORE_MAIN.VIEW_FRA I can see my products and categories translated into French, but when I switch to STORE_SUB_1.VIEW_FRA, products are still in plain English. I assume it’s the way Magento handles Store/View, but it makes product managament damn hard if for any product I have to change the French translation N times on any VIEW_FRA of each store. I’m pretty sure I’m missing something obvious and I’d be glad if someone out there can help me!

  6. I’m trying to add a different language for my store for a week now… But I still have a problem and I don’t know what to do anymore.
    I have one website, one store and I want two languages (the default is Dutch). I want to add an English version with the same products. When I go to the “Manage” store part, the English store view is visible and enabled. But when I go to Admin > Configuration and I want to go to the English store view, there’s nothing there in the dropdown menu of the Current Configuration Scope, only the default config and the Default Store View (the dutch one). Also when I’m trying to change the name of the Dutch one, it looks like Magento only updates it in “Manage Stores” and not anywhere else. I’m desperate right now.

    Reindex or cache doesn’t work… Already tried that. The default config option in Web > URL options > Auto-redirect to Base URL is set to “No”. Can anyone help me??!!!

  7. I am also trying to do what Felix is. Is there any way to link store views with the same store code perhaps and update the descriptions across all storeviews?

    My store setup:

    Store Views

    UK Company
    – English
    – French
    – German
    – Spanish

    US Company
    – English
    – French
    – German
    – Spanish

    EU Company
    – English
    – French
    – German
    – Spanish

    Hopefully someone can point me in the right direction.

  8. Hi All.
    I have two websites.
    1) International
    2) Us

    Each website had two store view (langauge)
    1.a International_franch
    1.b International_english

    2.a Us_franch
    2.b Us_english

    So, I have one question. How can do, that product attributes were the same values for International_franch and Us_franch websites. I want change product name or product description for two franch store views one time. Can I do that?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.