Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Which files and folders to symlink under public_html?

Solved by pamtbaau View solution

Started by Gez 11 months ago · 3 replies · 67 views
11 months ago

Story (you may skip)

I use multisite feature with both subdomain and subdirectory seperately in same system. Subdomain for sub1.site.com, sub2.site.com etc. and subdirectory for seperatesub1.site.com, seperatesub2.site.com etc. and that works. This question will be to help "seperatesub" folders by doing symlink them to main setup.
I try to reduce work (updates, copy-paste), inodes and space my system requires.


Question

Which folders and files i can symlink under public_html while not breaking anything?

Reason

If i didnt think long run i could try things but idk what might happen for example when an update comes. I already symlink plugins but idk what might happen when grav itself gets update. Actually im still worrying about shared plugins since idk much about system and how plugins work.

An opinion

Everything other than cache and user folders.

11 months ago

@Gin, Did have a look at the CLI docs of Grav? Especially Sandbox?

All my local websites are symlinked from one single Grav installation which I keep up to date.

11 months ago

Sandbox

All content in /user will be carbon copies

Symbolic Links

Where Grav is concerned, symlinks are a great way to add plugins, themes, and content to multiple instances and doing so in a way that makes it infinitely easier to update and modify. You make a change once, and it appears everywhere the file(s) are symlinked.

So what i understand is i can symlink everything and it will work just fine even after grav update and installing plugins etc.

For sandbox, i guess it also symlink cache folder but i guess i will need it since different websites have different caches. when one cleared i dont want other also cleared.

Is there a way to include cache folder to list to not symlink alongside user folder for sandbox? Even if there isnt im gonna symlink big folders at least :)

Thanks for leading to docs. ^^

11 months ago Solution

@Gin:
For sandbox, i guess it also symlink cache folder but i guess i will need it since different websites have different caches. when one cleared i dont want other also cleared.

I guess... I guess... Try it and you'll know it... ;-)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 51 8 hours ago
Support · by Anna, 2 days ago
2 58 10 hours ago
Support · by Justin Young, 11 hours ago
1 30 11 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 55 5 days ago