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 126.96.36.199 – earlier editions had different ways of routing requests using .htaccess or index.php.
- Buy a multi-domain SSL certificate. Make sure that new domain is associated with this certificate.
- Point your new domain name at your server.
- Log into Magento and do a backup – peace of mind, etc.
- 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.
- 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.
- 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.
- Go to CMS/Pages and create a new home page & associate it with the new Website.
- 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.
- 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
- 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.
- 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
- 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.
- 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.
- 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.
- Under Contacts change the main contact email as required.
- Under Sales/Invoice & Packing Slip Design – change the default logos to your new logo.
- 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).
- That’s more or less it for the System/Configuration settings.
- 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.
- 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:
## 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
- 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.
- Upload the new .htaccess file.
- 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.
- 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”
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?
No, I think it works one website = one shopping cart. I believe you can share shopping carts across stores but not websites.
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.
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.
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!
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,
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?
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,
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
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.
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.
Comments are closed.