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.

Archive /

Our old forums are still available as a read-only archive.

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

Build my site in a folder other than "tutorial" ?


Go to End


4 Posts   3739 Views

Avatar
amdayton

Community Member, 8 Posts

16 November 2008 at 1:18pm

I'm definitely new at this, but I've been trying to find an answer to this all afternoon with no luck. All of the tutorials are building a site in the directory "tutorial." It doesn't seem obvious to me how one sets up their site in a different directory, like "appname." For production it doesn't seem to make sense to build my app in the "tutorial" folder. What am I not getting here?

Thanks.

Avatar
Hamish

Community Member, 712 Posts

16 November 2008 at 3:23pm

Ah, you can put it any subfolder under your silverstripe root. Just make sure you have the _config.php file there and you're good to go.

"What the heck?" you might say...

Any subfolder of your silverstripe root can define page types, have templates, etc. This is how modules work. When you run /build/db, SilverStripe finds those folders with _config.php files and adds those datamodels to your site.

So you could build the basic functionality of your site into a folder called '/mysite/'. You could also put the code for a forum in your /mysite/ directory too - OR you could put it into a new /forum/ folder - SilverStripe doesn't care! :)

Hope this helps!

Avatar
mejobloggs

Community Member, 11 Posts

18 November 2008 at 8:31am

Edited: 18/11/2008 8:32am

I was just about to ask this question too. It's a bit silly that the SilverStripe tutorial only sets you up for working in the tutorial folder. Imo the tutorial folder should be able to be deleted at any time without losing anything important, yet the tutorials get you to put everything in it

Avatar
(deleted)

Community Member, 473 Posts

18 November 2008 at 8:58am

In 2.3, everything is done in mysite/, with the tutorial just being a theme, thus you can delete it with ease.