How to create multiple stores with different domains in Magento with same products, same database but different customers.
Example :
I bought 2 domains: mystore1.com and mystore2.com (FYI: mystore1.com already running)
Now I want to add mystore2.com to mystore2.com with same products, same database but different customers.
Notes:
- Already tested with This Way
- Please answer step by step !! Bounty for a correct answer.
and do not answer with referral link.
Best Answer
Preconditions
Magento already created a default website on installation (in your case mystore1.com).
Step 1 - Creation
Go to
System->Manage Stores
. Click on Create Website. Fill in the the form with desired values and save. Example:Click on Create Store. In the form fill in the values and save. Example:
Click on Create Store View. In the form fill in the values and save. Example:
So far you have created a new website.
Step 2 - Configuration
Go to
System->Configuration->Web->Unsecure
. From the top left dropdown select 'Website 2' (the website not the store view) and fill the following value.If you plan to use SSL on your website you should do the same on the
Secure
section but fill in the secure url of your website for 'Base URL'.Save the changes and clear the cache.
Step 3 - Server configuration
Now you have to make the document root of mysite2.com point to the same folder as mysite1.com.
Add this to your
httpd.conf
fileNow when you visit mysite2.com you will see the same homepage as mysite1.com but the first click you make will take you to mysite1.com.
To fix this add the following to
.htaccess
.Restart the server, clear the cache again just in case (contents of var/cache) and you should be ready.
In case I missed something you can check this tutorial that basically says the same things.
[EDIT]
After configuring the new website, in order to separate the customers go to
System->Configuration->Customer Configuration->Account Sharing Options
and set the value for Share Customer Accounts to Per website.