I like that the content folder is separate, because it contains everything the users create and modify. Easy to backup and version when we update sites.
@Malvese I agree, I also like to have the content folder separately for Git versioning. It might also make sense to move templates and stuff out of the web root as suggested elsewhere. As for the rest, maybe there are as many preferences as there are developers. For my part, I don’t really care if the stuff is in 2, 3 or 4 different folders, in fact, if I have content and the rest in 2 repos, I end up with only 2 folders in my web root anyway:)
I hadn’t thought about it but one thing I’d like to move is the accounts folder, because users with admin rights can create users and I don’t want to risk losing or overwriting them when I update the site.
Unfortunately there is no way to move that folder in Kirby core. I guess I could try to use a symlink instead.
Curious how you set up your folder structure, could you share it?
Do you keep content inside the web root, and change the path in /site.php or with symlinks?
Pretty basic, in fact; as I mentioned above, with just a content folder and a “theRest” folder in the web root or even within a project folder and changing the path in site.php. Haven’t really experimented with putting stuff outside the web root yet.
Thank you. I actually have a little trouble setting it that way.
So your Kirby install is in a subfolder of your web root. How would I make mydomain.com point that subfolder instead of the web root? Another .htaccess file with a redirect on the web root?
Also, how do I go up one level in site.php? Not sure relative paths work, like: $kirby->roots->content = $kirby->roots()->index() . DS . '../content';
I think it depends on your client’s hosting provider. If you use shared hosting with the domain name included, you sometimes cannot point the main domain to anything else than the web root. Then in such a case, you have to live with that and certainly not move anything outside the web root anyway or persuade your client to move to another provider, or keep domains and hosting provider separate (that’s actually what I do with my personal domains, they live separately from where I host my stuff, so I can point them to whatever server I want).
You can: Simply set $kirby->roots->accounts to your desired destination.
Right now, this doesn’t work for every directory, but it might work very soon.