Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
mutiple installs (different domains)/different hosts/ one database
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

i have read somewhere this is possible, but I cannot work out how to configure it:

1) Multiple domains on seperate hosts
2) One main installation of magento on one of the domains - we would like to use this database as the master controlling all of the other domains. We have setup the store and store views for the other domains on this install (including root categories etc).
2) Magento files are on each domain
3) Trying to get each install to connect to a single database (on the main domain see point 2)).
4) When we run the install on any of the domains and try and point the install to use the master domain it does not work
5) We have tried to manually configure the database setting in local.xml for each domain but when we navigate to the domain it starts the install process again.

Is there any guidlines for doing what we are attempting?

Appreciate the help

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

I am still struggling with this one. I have tried various configurations and none appear to work - has anyone managed to get a similar config working?

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@golles, try this:

1. Complete installation of the master domain website.
Now you should have 1 working copy of Magento with 1 store.

2. Using admin interface on master domain create all the stores and websites that you will be running.
Note store codes that you create.

3. Complete installation of one additional domain website.
Use remote database credentials to connect to database installed by step 1.
Use encryption key you have used in master domain.

4. Edit index.php for the additional domain website:

// set one of the store codes you have created in step 2.
Mage::run('my_additional_store');
Check that both master and additional domains websites work.

5. Copy app/etc/local.xml from additional domain in step 3 to all other additional domains to avoid need of re-installation of each additional domain.

6. Edit index.php of each additional domain same like in step 4 to let websites know which stores they should be showing.

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

many thanks - I appreciate the help

I will test this out as soon as I can and report back

thanks again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

@moshe

thanks for the suggestions but I cannot get this to work.

I have all the config setup on the main domain
the second domain is using the correct store code in index.php
the second domain is using the correct database credentials in local.xml (i.e. for the master domain)

I am getting 404 errors on the second domain - can’t browse to any page.

it is as if it is not trying to connect to the database just serving a 404 page from the local installation

appreciate your help

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

@moshe

fixed it.

I missed the ,’website’ off of the Mage::run command so for others here is the correct command to place in index.php:

Mage::run('my_additional_store_code''website');

thanks for all of the help @moshe - i am still testing but things are looking good.

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 

this is working perfectly - it is a really brilliant feature - thanks

I have one question:

with the set up I highlight above i.e. app installed on each domain but running off one master database , i assume the admin>system>cache management feature only controls the master domain?

and for the other domains/sites I will need to manually delete the var/cache files?

thanks for the help

 
Magento Community Magento Community
Magento Community
Magento Community
 
ArmandoR
Jr. Member
 
Avatar
Total Posts:  21
Joined:  2008-08-21
Caldwell, Idaho, U.S.A.
 

Moshe & golles (or others),

I followed the steps outlined in your thread, and I now have two instances of Magento sharing a single database. But I am having some trouble with the second domain. When I go to the home page (index.php) all seems well, but when I try to click to any category or product I get a 404 error.

Any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
syle
Jr. Member
 
Total Posts:  21
Joined:  2008-07-01
Cluj
 

Hi
I have 3 different domains put on the same magento.
When click on category the 2 domain appears: domain1.com/domain2/category

Ex:

my first domain: http://www.domain.com
second domain: http://www.domain2.com
the third domain: http://www.domain3.com

click on category on the domain2.com
the link who appears is: http://www.domain.com/domain2/category

I want on the second domain, that link to be: http://www.domain2.com/category
Thank’s in advance
syle

 
Magento Community Magento Community
Magento Community
Magento Community
 
redwagon
Jr. Member
 
Total Posts:  17
Joined:  2008-07-02
MN, USA
 
Moshe - 17 June 2008 07:04 AM

@golles, try this:

1. Complete installation of the master domain website.
Now you should have 1 working copy of Magento with 1 store.

2. Using admin interface on master domain create all the stores and websites that you will be running.
Note store codes that you create.

3. Complete installation of one additional domain website.
Use remote database credentials to connect to database installed by step 1.
Use encryption key you have used in master domain.

4. Edit index.php for the additional domain website:

// set one of the store codes you have created in step 2.
Mage::run('my_additional_store');
Check that both master and additional domains websites work.

5. Copy app/etc/local.xml from additional domain in step 3 to all other additional domains to avoid need of re-installation of each additional domain.

6. Edit index.php of each additional domain same like in step 4 to let websites know which stores they should be showing.

Have you figured out yet how to get the product images to link to the main website? I was told I have to upload the media images to EACH domain every time products are added. A BIG pain when there are 7 domains.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
green17
Jr. Member
 
Total Posts:  3
Joined:  2008-08-27
 

Hi All

I have been trying to follow the steps, hope you can help me.

I want to run 2 sites:
http://www.musicmatterslisburn.com/index.php - Main Domain
http://www.zooinstruments.com/ - 2nd Domain

I have so far done this:
1. Complete installation of the master domain website.
Now you should have 1 working copy of Magento with 1 store.

2. Using admin interface on master domain create all the stores and websites that you will be running.
Note store codes that you create.

3. Complete installation of one additional domain website.
Use remote database credentials to connect to database installed by step 1.
Use encryption key you have used in master domain.

4. Edit index.php for the additional domain website:
// set one of the store codes you have created in step 2.

Mage::run('my_additional_store_code''website');

5. In the Magento admin picking the 2nd domain from the drop down. (System > Configuration > Web) I have set:
Unsecure - Base URL > http://www.zooinstruments.com/
Secure - Base URL > https://www.zooinstruments.com/
I left everything else as is on the web tab is this right?

It’s working on the home page but uses the default theme and all links go to the main domain?

Many Thanks for your help. A

 
Magento Community Magento Community
Magento Community
Magento Community
 
golles
Sr. Member
 
Total Posts:  257
Joined:  2008-01-15
 
green17 - 19 September 2008 12:55 AM

Hi All

I have been trying to follow the steps, hope you can help me.

I want to run 2 sites:
http://www.musicmatterslisburn.com/index.php - Main Domain
http://www.zooinstruments.com/ - 2nd Domain

I have so far done this:
1. Complete installation of the master domain website.
Now you should have 1 working copy of Magento with 1 store.

2. Using admin interface on master domain create all the stores and websites that you will be running.
Note store codes that you create.

3. Complete installation of one additional domain website.
Use remote database credentials to connect to database installed by step 1.
Use encryption key you have used in master domain.

4. Edit index.php for the additional domain website:
// set one of the store codes you have created in step 2.

Mage::run('my_additional_store_code''website');

5. In the Magento admin picking the 2nd domain from the drop down. (System > Configuration > Web) I have set:
Unsecure - Base URL > http://www.zooinstruments.com/
Secure - Base URL > https://www.zooinstruments.com/
I left everything else as is on the web tab is this right?

It’s working on the home page but uses the default theme and all links go to the main domain?

Many Thanks for your help. A

Have you set the theme for the 2nd store in the admin correctly?

admin>system>configuration>general>design>themes - choose the 2nd store in the Current Configuration Scope: and then asign the correct theme.

As a side note, this is what we have ended up doing:
Magento install on all domains
Alter local.xml on each domain to use master domain database / admin
Have all theme files for each secondary domain on the secondary domain installation
Copied media directory files to each secondary domain after adding products / images via master domain admin

Hope this helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
Thejosh13
Sr. Member
 
Total Posts:  252
Joined:  2008-06-23
 

Nothing seems to work, I have tried everything
The closest I can get is the 2nd site shows everything, but all the links lead back to the main sites url ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
shin_mangaman
Member
 
Total Posts:  55
Joined:  2008-09-17
 

Moshe said:

3. Complete installation of one additional domain website.
Use remote database credentials to connect to database installed by step 1.
Use encryption key you have used in master domain.

what is “remote database credentials” !?!?!?!? how can i connect the domains to the MAIN database installed?!?!?!

Thank you very much

 
Magento Community Magento Community
Magento Community
Magento Community
 
shin_mangaman
Member
 
Total Posts:  55
Joined:  2008-09-17
 

no one can tell me how can i connect the domains to the main database with remote database credential!?!?!?! pleaseeeeeeeeeeee!!!!!!! ^ ^

 
Magento Community Magento Community
Magento Community
Magento Community
 
ashrafloo
Jr. Member
 
Total Posts:  1
Joined:  2010-05-21
 

Hi,
did anybody run this successfully? did it work for anybody? i need the same thing 1 magento main store and multi domain magento installation on different hosts so the 2nd and the 3rd domains could connect to the main magento data base.
pls help
Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2