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:

Installing SilverStripe /

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

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

Symlinking the Framework and MAYBE the CMS

Go to End

3 Posts   1200 Views


Community Member, 14 Posts

8 August 2012 at 2:48am

Edited: 08/08/2012 2:49am

Dear SS Team,

nice to use your Framework and CMS. But it will be much more efficenity if we could use onle ONE "framework" and "cms" codebase. SS doesnt allow to symlink both folders in a Project. So every time a need to copy and maintain 50MB of the same files in each Project.

Is it so hard to use a alternative include and require strategy to solve that Problem??!!

Hope you will answer to this Topic.



Forum Moderator, 5523 Posts

8 August 2012 at 8:38pm

You should be able to symlink cms, framework fine. Though each of your sites will need to define a TEMP_FOLDER const in the _config.php


Community Member, 904 Posts

21 August 2012 at 11:37pm

Edited: 21/08/2012 11:37pm

Adding the TEMP_FOLDER constant to _config.php seems to be too late in the startup-process. I had to add it to _ss_environment.php to make it work. Eg.

	define('TEMP_FOLDER', realpath('tmp'));

When a folder called tmp is in the same directory structure (eg. webroot) as the _ss_environment.php file.

There's another issue though: If you don't serve pages via index.php, the BASE_PATH will be wrong and Core.php will search for a _ss_environment.php file in the real location of the framework folder (not the symlinked framework folder).

Adding the following lines to an _ss_environment.php file in the same folder as the real framework folder correctly sets the base-path

// make BASE_PATH point to the directory where the symlinked framework folder resides!
define('BASE_PATH', rtrim(dirname(dirname($_SERVER['SCRIPT_FILENAME'])), DIRECTORY_SEPARATOR));
// set temp folder accordingly

The code above fixes all issues I had with symlinking the framework and cms folders to several sites.