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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

How to Setup a Multisite with Version 3.0.5?


Reply


2 Posts   516 Views

Avatar
ELF

Community Member, 7 Posts

10 May 2013 at 9:16am

Edited: 10/05/2013 9:18am

So the recipe for a multi-site install (not using the subsites module) .
1. Copy the silverstripe files to a master silverstripe directory; ex. "silverstripe305"
2. Don't install it (perhaps thats ok too?)
3. Copy assets, mysite, & themes folders to another directory; ex. "mysymlinkedsite" [do I also copy the index.php?]

4. Set the correct rights to these folders [what rights are those 777 for write access of 655?]

5. Create symlinks to the shared folders (saphhire, cms, etc.)
[OK, this is old, my versions doesn't have a sapphire folder? and what about all the files that are just in the silverstripe305 folder not its subfolders? How do I symlink this stuff and which ones?]

6. Create a "silverstripe-cache" folder in your "mysymlinkedsite"
[just out of curiosity why? am I supposed to reference it in a file somewhere of will silverstripe do that automatically?]

7. Proceed with the installation as normal (by visiting e.g. localhost/mysymlinkedsite)
8. to install it on additional addon-domains in the future: copy assets, mysite, & themes folders to the newsites directory; ex. "mynewsymlinkedsite". and then do whhat? create another index.php for it? Symlink some files like in step 5 again...

Could you guys help me clarify, Thanks a lot. I really appreciate it.

Avatar
leepoooo

Community Member, 2 Posts

10 May 2013 at 4:26pm

Edited: 10/05/2013 4:27pm

Modify the _ss_environment.php

global $databaseConfig;
global $ASSETS_DIR;

if((strpos($_SERVER['SERVER_NAME'], '**') !== false))
{
   $databaseConfig = array(
   "type" => 'MySQLDatabase',
   "server" => '',
   "username" => '',
   "password" => '',
   "database" => '',
   "path" => '',   
);
define('ASSETS_DIR', '');

}

else{
   $databaseConfig = array(
   "type" => 'MySQLDatabase',
   "server" => '',
   "username" => '',
   "password" => '',
   "database" => '',
   "path" => '',   
);
define('ASSETS_DIR', '');
}

And change theme in the table siteconfig