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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Multiple Sites, single database


Go to End


8 Posts   6261 Views

Avatar
freefall

Community Member, 5 Posts

15 June 2009 at 6:39pm

Hey everyone,

Just wondering if it is at all possible to have multiple websites run on a single database.

Also, if we can, is there any way to define which content is published where? Basically we want to create an Intranet/Internet site, with all pages available on an intranet (Theme A) and only some pages published onto the internet site (Theme B).

Is this possible at all with silverstripe?

Cheers,
freefall

Avatar
Willr

Forum Moderator, 5523 Posts

16 June 2009 at 5:14pm

Just wondering if it is at all possible to have multiple websites run on a single database.

Yes. Its called Subsites - http://doc.silverstripe.com/doku.php?id=modules:subsites. Currently it is beta code.

Avatar
muzza4

Community Member, 2 Posts

17 June 2009 at 12:01pm

Hi there,

I've been looking for a CMS to handle a number of client websites, and it's a bit cool that I've come across SilverStripe since you're just down the road (I work from home in Khandallah).

I'll get my technical people to load the tool if I can get a handle on the single database issue, as it's one of my main requirements. It's a main requirement because I am concerned that building a lot of websites using a CMS tool will eventually proliferate too many databases for easy management.

So what does Subsites being in beta mean for this module
- is it in active development awaiting bug reports
- is anyone using it anyone out there using it
- is there a predicted data when it'll be out of beta?

Thanks
Murray

Avatar
Willr

Forum Moderator, 5523 Posts

17 June 2009 at 1:15pm

is anyone using it anyone out there using it...

Yes we use it for a number of our internal clients. See for example http://epmu.org.nz which has a subsite http://workrights.epmu.org.nz/

is it in active development awaiting bug reports..

Yes as we constantly use the module for clients (I have implemented it http://oceanicnz.co.nz/). As you find issues you can track them at http://open.silverstripe.com/query?status=replyneeded&status=new&status=inprogress&status=reviewed&group=status&milestone=subsites+0.1 . Those tickets are the last ones assigned to subsites for 0.1. Once they are fixed you will see a 'stable' version released. But saying that I have not run into too many issues with it. It just needs some polish. If you come across issues (as always) we love to see bug reports / feedback.

handle a number of client websites

This differs slightly from our standard use case for subsites. Its more designed for clients who run promotion sites or several sites under the 1 CMS. I suppose running your own clients under subsites would work as it would mean you would only need to upgrade 1 piece of core code to upgrade over all the sites but the side effect is if you develop a custom page type (eg a 'SuperCoolGalleryPage.php') then I believe each of your subsites will see that SuperCoolGalleryPage.php - which depending on the type of work you have good be a advantage or a disadvantage.

Also note the performance of running several sites from 1 DB will also be slightly slower (especially if one of the sites is being quite busy) but then again depending on the type of site it could be a non issue. As long as your clients didn't want to take the site else where or change developers then having all their data combined isn't an issue but if they ever wanted to change developers providing them with the existing site (as quite alot of ours what when they change hosts) could be a complex task.

I work from home in Khandallah

Probably just down the road from me then :)

Avatar
muzza4

Community Member, 2 Posts

17 June 2009 at 1:49pm

Hi again,

Thanks for the prompt and detailed answer. Seems like subsites isn't right for us because each site needs to be separate.

Our business scenario in this area is currently developing, but we expect
1. to host most but not all client websites
2. some client websites will be very similar to others (other than content)
3. a new feature added will apply to most websites.

Does that mean that we have a separate MySQL database for each website?

Does this present any management issues e.g.
. SilverStripe upgrades
. adding the same page for 20 clients on 20 databases
. backup
. etc.

And presumably we would have just one installation of the SilverStripe code for our hosted websites?

Regards
Murray

Avatar
Willr

Forum Moderator, 5523 Posts

17 June 2009 at 2:17pm

And presumably we would have just one installation of the SilverStripe code for our hosted websites?

Well it depends what your relationship is with your clients and how customized your solutions go. You have a couple options. I personally prefer to have each site as a separate installation and database (with global setting stored in the _ss_enviroment file). This means all my sites are mutually exclusive and when I upgrade one to say a new version of SS I do not risk breaking the rest of them but if I need a constant value over all the sites I can edit the _ss_environment file.

The other option is to have 1 cms/ jsparty/ and sapphire folder (or using svn externals) but separate databases for each. This has the benefit of managing 1 SS installation, which makes updating security releases easier but the downside is you will have to run through *every* site to make sure your update has not brought down one of them. If you have simple sites this would be easy but if you have custom functionality and complex sites it can get risky that you have to update the code on 10 sites just to update the SS version on 1 site. Eg if Site 18 wants to use the userforms module - this module requires 2.3.2 but Sites 1-17 have modules / code which is not compatible with 2.3.2 (eg if you are running 2.2.3 currently) then you have to a) not use userforms or b) fix 17 sites.

Avatar
mhdesign

Community Member, 216 Posts

18 January 2010 at 4:03pm

Edited: 18/01/2010 4:04pm

Hey guys, I'm wanting to share page content between two very similar sites (essentially the content would be almost identical but sites would be branded differently). So when the client updates a navigation item or page content this change will be reflected in both sites. I would imagine this could be done in SilverStripe - is this module the best way to go about it or are there better solutions?

Avatar
ulysses

Community Member, 57 Posts

30 March 2010 at 6:14pm

Edited: 26/07/2012 10:03pm

The sub-site admin has been given the permissions: Access to 'Site Content' (CMSMain) and Accessto 'Files & Images' (AssetAdmin)

These permissions make the Site Content and Files & Images tabs visible inthe CMS when they log in.

The subsite admin can create folders in the Assets folder but cannot upload files.

When they try to upload files, an error Alert box comes up with the following text: File is not a valid upload

The files attempted to be uploaded are standard files such sa .GIF or .JPG, .PDF, etc. Does anyone who why this is?

I am trying to upload files into the same assets folder as the main site. Do you have to create a seperate Assets folder? Please advise - anyone?