Jump to:

23456 Posts in 18905 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Multiple Sites, single database

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

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

Page: 1
Go to End
Author Topic: 4049 Views
  • freefall
    Avatar
    Community Member
    5 Posts

    Multiple Sites, single database Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Multiple Sites, single database Link to this post

    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.

  • muzza4
    Avatar
    Community Member
    2 Posts

    Re: Multiple Sites, single database Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Multiple Sites, single database Link to this post

    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

  • muzza4
    Avatar
    Community Member
    2 Posts

    Re: Multiple Sites, single database Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Multiple Sites, single database Link to this post

    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.

  • arthurdent
    Avatar
    Community Member
    163 Posts

    Re: Multiple Sites, single database Link to this post

    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?

  • ulysses
    Avatar
    Community Member
    57 Posts

    Re: Multiple Sites, single database Link to this post

    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?

    4049 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.