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.

Installing SilverStripe /

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

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

[solved] Custom folder name (other than 'mysite') issue


Go to End


5 Posts   2010 Views

Avatar
lulu

Community Member, 7 Posts

16 February 2016 at 12:51am

Edited: 16/02/2016 1:22am

Hi,

I'm trying to put my code and theme in the custom name folder - I've freshly installed SS and configured it, then I've changed folder name and config files in customname/_config.php

	$project = 'customname';
	SSViewer::set_theme("customname");

And customname/_config/config.yml

---
Name: customname
After:
  - 'framework/*'
  - 'cms/*'
---
SSViewer:
  theme: 'customname'

All I get is:

Warning: require_once(/home/stage/public_html/mysite/_config.php): failed to open stream: No such file or directory in /home/stage/public_html/framework/core/manifest/ConfigManifest.php on line 141
Fatal error: require_once(): Failed opening required '/home/stage/public_html/mysite/_config.php' ... 

Where this path location is set? I cannot see it in any settings at all.

Avatar
helenclarko

Community Member, 166 Posts

16 February 2016 at 8:42am

Edited: 16/02/2016 8:43am

Hi Lulu,

I believe 'mysite' is a required folder.
The name of folders within the root is very important.
The folder you want to change the name of is likely under the 'theme' folder.

Under theme you might have 'simple' (as default theme), you can change 'simple' to anything you like.

-helenclarko

Avatar
lulu

Community Member, 7 Posts

16 February 2016 at 9:34am

Hi Helen,

I have another instance of SS (completely different website bult 2-3 years ago) where all code is in custom named folder (but not sure if it's SS 3.0 or 3.1).

Also please see https://docs.silverstripe.org/en/3.2/getting_started/directory_structure/ - Custom Code Structure section which says:

We're using <mysite> as an example - arbitrary directory-names are allowed, as long as they don't collide with existing modules or the directories lists in "Core Structure".

Any ideas?

Thanks, Lulu.

Avatar
Devlin

Community Member, 344 Posts

17 February 2016 at 12:07am

Renaming the mysite folder works fine. I do it all the time.

Warning: require_once(/home/stage/public_html/mysite/_config.php): failed to open stream: No such file or directory

You need to do a /dev/build/?flush

Avatar
lulu

Community Member, 7 Posts

17 February 2016 at 12:14am

Thanks Devlin!!!

It worked!

Such a simple solution and so many struggles! :)

Remember people! Flush, always flush ;)