I want to create two new shops beside my current one. The domain should be the same, but I want to add some suffixes to the domain for the other two stores. So I want a shop structure like the following:


Shop 1: example.com/
Shop 2: example.com/eu/
Shop 3: example.com/us/


Shop 2: example.com/eu/en/
Shop 2: example.com/eu/fr/

Shop 3: example.com/us/en/
Shop 3: example.com/us/fr/

For this reason I have created the following structure inside the magento backend:

Shop 2 (code: base_eu)          Store EU                German (code: eu_de)
                                                        English (code: eu_en)

Shop 3 (code: base_us)          Store US                German (code: us_de)
                                                        English (code: us_en)

Furthermore I have created two subdirectories inside my magento root folder (eu/ and us/) which represents the "Shop 2" and "Shop 3" and I have changed the base url of this two shops to example.com/eu/ and example.com/us/.

In Addition I have created a lot of symlinks (app, errors, includes, js, lib, media, skin, var, index.php) and I have copied the .htaccess inside the subdirectories eu/ and us/.

After this I have modified the htaccess files in both folders:

eu/.htaccess -> SetEnv MAGE_RUN_CODE eu_de
us/.htaccess -> SetEnv MAGE_RUN_CODE us_de

So the default store view of both pages is the german store view.

A another solution is to edit the index.php of both directories and add something like this:

$mageRunCode = 'base_eu';
$mageRunType = 'website';
Mage::run($mageRunCode, $mageRunType);

So I can avoid the htaccess changes, but the result would be the same.

This works great so far, but how can I add the other store views now? Should I add another subdirectories inside the directories for each language or is there a better way to do this?


I have tried something like this now:

      (symlinks app, media, ...)
        (symlinks app, media, ...)

It's working so far, but this seems to be a little bit tricky.

2 Answers 2


I you want to do this with sub directories you have to create symlinks to your Magento folder: ln -s /home/example/example.com/html/app/ app

ln -s /home/example/example.com/html/includes/ includes

ln -s /home/example/example.com/html/js/ js

ln -s /home/example/example.com/html/lib/ lib

ln -s /home/example/example.com/html/media/ media

ln -s /home/example/example.com/html/skin/ skin

ln -s /home/example/example.com/html/var/ var

also copy the index.php to your folders

  • Yes, I know that and I have already created the relevant symlinks, but is my directory structure of my question above ok? Because I have to create a lot of symlinks for every store view again and again if a new lanuguage will be added.
    – Fox
    Aug 10, 2016 at 12:15
  • Yes the structure is correct, but I would never add the stores like this. As you can see you have at least 3 stores which are English. What I would do is buy or develop a module that supports this. Aug 10, 2016 at 12:20

I have such a module running, which makes websites per country. This way you can adjust the pricing per country/currency and redirect users automatically to the right store. I would suggest this instead of your solution as with time the site will be really slow.

  • Ok, thank you then I will take a look at Magento Connect. Can you tell me which extension do you use?
    – Fox
    Aug 10, 2016 at 13:48
  • This is my own extension, don't know if there are any on the connect store. Aug 10, 2016 at 14:30
  • Ah ok and is your extension available on github or private?
    – Fox
    Aug 10, 2016 at 14:57
  • It is private, but give me your contact details and I will contact you. Aug 10, 2016 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.