Magento Multi-Website Checklist

One of Magento’s great features is the multi-site & multi-store capabilities. If you’re new to Magento, this means that you can run more than one website from the same Magento installation. Having just added yet another website to a client’s Magento installation, I thought I’d jot the steps down as an aide-mémoire. So below I’m going to outline a checklist of the actions required to set up a mutli-website store in Magento.

For the purposes of the this example, assume I already have a Mage website eddiemay.me.uk and want to add another website eddie-may.com. Also assume that I’m selling to the same country with the same Tax & shipping rules, payment gateway, etc. Also assume that I’m going to be using the same template but use a different skin to make it look different.

NB: This example is for Magento Community Edition 1.7.0.2 – earlier editions had different ways of routing requests using .htaccess or index.php.

  1. Buy a multi-domain SSL certificate. Make sure that new domain is associated with this certificate.
  2. Point your new domain name at your server.
  3. Log into Magento and do a backup – peace of mind, etc.
  4. Set up a new root category & then add any sub categories as required. This root category is going to be ‘home’ of the new website.
  5. Go to System/Manage Stores. Next, hit the Create Website button & fill in the necessary information – keep a note of the value you put in the “code” field. In my example I’m going to use “may” as the code value.
  6. Repeat the steps for Create Store & Create Store View. When you create a store you set the root category to be the one you’ve just created in step 4 above.
  7. Go to CMS/Pages and create a new home page & associate it with the new Website.
  8. Now go to System/Configuration and change the ‘Current Configuration Scope’ to your new website. You’ll notice that the values are a copy of the default website. You’re now going to have to go through a number of tabs and change the required values. Here I’ll refer only to the essential changes.
  9. Under System/Configuration/Web change the Secure & Unsecure urls to your new domain name – in this case eddie-may.com. Also under Default Pages set the CMS Home Page to the page you created in step 7. Under the Session Cookie Management tab, add your new domain as the Cookie Domain like so -> .eddie-may.com
  10. In the Design tab you now have a choice of determining how the website will look. Here I’m going to assume that you’ll use the same template but use CSS to change the style of the site.
  11. So, upload a new skin under the /skin/frontend/default. Lets assume the new skin is called eddiemay, that means you’ll have a folder like so /skin/frontend/default/eddiemay
  12. If that’s the case, the design settings will be Package = default; Skin (Images/CSS) = eddiemay; Layout & Default will be the same values as your first website.
  13. Still under the Design tab, change the HTML Head, Header, Footer, etc as required. From an SEO perspective, make sure that the Default Title & Description are unique.
  14. Now go to Store Emails – you’ll need to change email addresses to reflect the new domain name. Make sure that these email accounts actually exist before going live.
  15. Under Contacts change the main contact email as required.
  16. Under Sales/Invoice & Packing Slip Design – change the default logos to your new logo.
  17. Under Sales/Sales Emails – you may have to change the email templates if you’ve heavily customised your default email templates (you may have hardcoded your store name, for example).
  18. That’s more or less it for the System/Configuration settings.
  19. Now go to CMS section. Here you may have to create new CMS pages & Static Blocks, or at least associate existing ones with the new website. At a minimum you’ll need to associate the Contact, About, Privacy, Terms, Shipping pages with the new website.
  20. The next thing you’ll need to do is add the new website to your .htaccess file. You need to add the new domain like so:
  21. ## multidomain
    SetEnvIf Host www\.eddiemay\.me.uk MAGE_RUN_CODE=base
    SetEnvIf Host www\.eddiemay\.me.uk MAGE_RUN_TYPE=website
    SetEnvIf Host ^eddiemay\.me.uk MAGE_RUN_CODE=base
    SetEnvIf Host ^eddiemay\.me.uk MAGE_RUN_TYPE=website
    SetEnvIf Host www\.eddie-may\.com MAGE_RUN_CODE=may
    SetEnvIf Host www\.eddie-may\.com MAGE_RUN_TYPE=website
    SetEnvIf Host ^eddie-may\.com MAGE_RUN_CODE=may
    SetEnvIf Host ^eddie-may\.com MAGE_RUN_TYPE=website
  22. You’ll notice that I’ve used the code “may” – this was the value I entered in the new Website code field in step 5 above.
  23. Upload the new .htaccess file.
  24. Now test your new website – chances are that you’ll get an error. Downloading the error report will give a cryptic “SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘database-name.catalog_category_flat_store_3′” doesn’t exist – or something similar. If this happens, log into your Magento administration UI, go to System/Index Management & you’ll probably see that several indexes need re-indexing. Once complete, your website should now work as expected.
  25. If all is good, its now time to add some products. You could copy products over from the original website but personally I’d create them from scratch or upload new ones. This is because you can then optimise their descriptions, etc., to avoid duplicate content penalties, etc.

Well, I think that covers all the bases. This will probably take you about 2 hours to complete, depending on the amount of customising of Email template, Static Blocks, etc. The CSS customisations are another thing altogether.

If I’ve left anything out, please let me know. Either way, I hope you find it useful.

12 thoughts on “Magento Multi-Website Checklist

  1. Thanks on the great article I have found similar post I am trying to accomplish a multi-site using different domains. Will setting up a magento store the way you described be allowed to share shopping carts across the different sites?

    -Luis

  2. Hi Luis,
    No, I think it works one website = one shopping cart. I believe you can share shopping carts across stores but not websites.
    Best wishes,
    Eddie

  3. Hi Luis and Eddie,

    yes Luis you cant share carts across websites. However its possible, you can take a look at this tutorial posted by Marius Strajeru.

    I tried it by myself on Magento 1.7. and it works, I didnt test it thoroughly though, so proof testing is in order.

    Best regards
    Filip

  4. HI,

    Thanks on the great article.
    Can anyone suggest me for multiple website we will create separate folder and place htaccess and index.php and other skins or media related field place there on the root directory of magento.

    -Rahul Mahajan

  5. Hello, I’ve been searching around reading tutorials like this and I have what is probably a really basic question, but can’t seem to figure it out. I have the stores set up on different websites and that all seems great, but for some reason they’re being forced to show the exact same Navigation Menus and I can’t seem to change that. Is this a problem in the theme we’re using? As in, will it be controlled on a theme by theme basis and just depends, or are there default settings in Magento to use different Nav Menus on different websites? Thanks for your time!

  6. Hi,
    Well, it depends!
    1st thing – Magento normally takes the categories -or root catalog – as the starting point.
    2nd thing – does each website have its own root catalog? If the shops share a root catalog, that’s where the main menu items are coming from.
    3rd thing – other menu items, like Contact, etc can be setup up in various ways. One way is via a template layout.xml file or in a template .phtml file. Or they might be done via a static block with is rendered by a template .phtml file. Does your template have a local.xml layout file? If so, look in there.
    4th thing – within Magento Configuration/Developer you can turn on template hints, etc. This will give you a clue as to where your menu is being created.
    Best of luck,
    Eddie

  7. Hi Eddie,

    We met at Joomla Day 2014. It was great to meet you and it was a great weekend. I’m in the process of setting up a multi domain Magento core, although I haven’t used Magento for several years, things have changed significantly. We are moving to either a dedicated server or hybrid cloud service with a single Magento core session and up to 8 ‘Websites’ with their own unique domains, (including email services, etc). My research has talked about creating separate folders for domains, using SSH to change server directives, adding to .htaccess, adding to index.php, creating many other different files and the list goes on and on with less than accurate examples and missing essential info, making it very confusing to determine the ‘best practice’. Is your method the best way to do this for a single server with multi-domains?

    Many Thanks
    Jason

  8. Hi Jason,
    Yes, J! 2014 was great.I’m already looking forward to 2015.
    Is my method the best? Well, it was the best for this particular instance, running 1.7! Using this method should be ok with a single server with multiple domains.
    What I would caution you about is the # of products – Community Edition performance can choke on >100k products (& remember, each child of a configurable product is a product).
    Keep in touch,
    Edidie

  9. Hi Eddie, ther will be less that 25k simple products although some of these will become part of configurable or grouped but I don’t think it will hit 100k I think. I’m currently negotiating a dedicated or ‘hybrid cloud’ Magento optimizrd service so hopefully there won’t be any choking! It also means I get SSH access which I dnt currently have on the shared hosting service which seems quite important for Magento based sites! Thanks

  10. I’m setting up different website in single magento, do I need to create separate folder and place htaccess and index.php and other skins or media related field place there on the root directory of magento? Do I create a different database?

    Appreciate your help.

    Thanks
    Sharon

  11. Hi Sharon,
    No, setting up a separate folder isn’t necessary, nor is creating a separate database. You can reference the other site in the main .htaccess file as outlined in step 21.
    As for design, that depends on how different the look and feel of the second site is. If its just a colour change, for example, you can create a new child skin that has the css & image folders, etc.
    You will need a multi site SSL certificate.
    Good luck,
    Eddie

Comments are closed.