Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

connect tp another database

Go to End

3 Posts   1569 Views


Community Member, 23 Posts

18 December 2009 at 7:22am

I have a bit of a problem. Here is the issue I have multiple instances of ss running in a MySQL database all sites have pages that have the same content.

Currently we have to input the same content over and over again. I think there as to be a better way.

Here is what i am thinking: Is it possible to create a database in the same server where these sites could get the data from but still have their ss instance to put the content that is not shared? Id so, how would i do this?

Any help would be greatly appreciated.


Community Member, 203 Posts

18 December 2009 at 10:44am

I believe I just did that by accident while testing on my computer because copied my config to that site. The database + login + connection you are using is in your $databaseConfig in mysite/_config.php.

But in order to access the data on all sites and display the data on all your sites you need to have the same fields in your page.php->getcmsfields and you need to have to use the same variables in your for all your sites.

Your images in the upload folder ... symbolic link?


Community Member, 23 Posts

19 December 2009 at 4:32am

Yes, essentially i have created page types that hold the shared data and all have the same fields.

Currently the only solution i have found is to export the tables from the global database and import them into the new sites. However as you can see this is not the ideal way of doing.

I would like that the new sites we build get the shared information from the global database, this way when we make updates to the global database the changes reflect on all sites.

My knowledge of php and mysql is limited so i am looking to see if it is even possible to do this in silverstripe.