Jump to:

23477 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » multisites possible?

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 2 3 4 5 6 7 8 9 10 11 12 13 14
Go to End
Author Topic: 17837 Views
  • michelsteege
    Avatar
    Community Member
    5 Posts

    Re: multisites possible? Link to this post

    I know this is an old topic but has anyone done this with silverstripe 3?
    I have symlinks to the framework, themes and cms folder and it kinda works except for the admin, the admin loads but when i click anything in the sitetree or menu the url updates but the page does not

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: multisites possible? Link to this post

    Hi!

    It’s working here, with both 2.4, 3.0 and master versions of everything managed through Git. Your issue looks JavaScript-related, I’d start debugging there.

  • michelsteege
    Avatar
    Community Member
    5 Posts

    Re: multisites possible? Link to this post

    How did you achieved it?
    I just added symlinks to the cms, framework and themes folder, added the FollowSymLinks option in the htaccess file and installed it.
    I can see the ajax request for the admin pages and the result that is working great only thing it does not do is update the page

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: multisites possible? Link to this post

    I don’t know… I recall being obliged sometimes to reload the page for updating it, but I cannot reproduce it, and for the actual site I’m developing I use the 3.0.2 tags of framework and cms, because the master branches have bugs in the CMS interface. What version are you using?

  • michelsteege
    Avatar
    Community Member
    5 Posts

    Re: multisites possible? Link to this post

    I use version 3.0.2
    Yesterday evening i tried it on a different server (localhost xampp) and did the follow:

    -made two folders test01 and ss3
    -First copied everything in the test01 folder
    -Installed silverstripe
    -Moved the cms, framework and themes folders to the ss3 folder
    -Created symlinks to those folders
    -Added the symlink option to the htaccess

    After that i got this error: SilverStripe Framework requires a $databaseConfig defined.

    It think it is looking in the wrong folder for the config file but i am not sure why?

  • michelsteege
    Avatar
    Community Member
    5 Posts

    Re: multisites possible? Link to this post

    Little update,

    If i add a _ss_environment.php file in the ss3 folder containing this code:

    define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTORY_SEPARATOR));

    Then it works except for the admin, there if have the same problem as before again

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: multisites possible? Link to this post

    Yes, in the SS3 folder you need a _ss.environment.php file with the BASE_PATH and the database credentials.

    Then, for each “project” folder:
    – Copy assets, mysite and themes folders from the SS3 install.
    – Copy also the .htaccess file (after installing the SS3 environment) and modify the RewriteBase directive.
    – Make the symlinks to cms and framework.
    – In mysite/_config.php, delete all mention of $databaseConfig and Director::set_dev_servers, and instead make sure that you file starts like this:

    <?php
     
    global $project;
    $project ='mysite';
     
    global $database;
    $database ='(databasename)';
     
    // Use _ss_environment.php file for configuration
    require_once("conf/ConfigureFromEnv.php");

    Then you just point your browser to something like “localhost/project_folder/dev/build” and you are ready to go!

    Hope it helps,
    Juan

  • michelsteege
    Avatar
    Community Member
    5 Posts

    Re: multisites possible? Link to this post

    Yes it works! thanks for your help!

    17837 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
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.