1

I want to place my Craft folder above the root. But, this is for an add-on site that sits within the public_html folder of the main site.

So, the index.php file sits here...

../public_html/add-onsite-folder/public/index.php

The Craft folder sits just above the /public_html folder of the main site.

So, how - specifically - do I set the $craftPath? It's not the default '../craft'; and I have tried numerous variations.

I am not installing locally.

Thanks

1

You will definitely want to put it above the root even if it's an add-on site, in which case the proper setup would be '../../../../craft' but this would generate a conflict with the main site craft install since there would be two folders with the same name above /public_html, so you could rename the add-on site craft folder to craftaddon and than the path would be '../../../../craftaddon'.

In case there's a really good reason for leaving it below the root, you would just use '../../../craft' but that does come with security risks that are pretty much not worth taking.

|improve this answer|||||
  • 1. The main site is not a Craft site. So, there is no conflict. 2. Everything on the Craft Installation page says "We recommend that you upload the folder above your web root if possible" ...so I am confused – Hellyar Oct 24 '16 at 20:22
  • Well, i made a mistake in my answer, meant above and wrote below ( will edit my answer to reflect that). But to sum it up the craft folder should not be inside public_html or one of its inner folders. – Gui Rams Oct 24 '16 at 20:26
  • Okay, that is cool. I got it to work using your recommendation above. I was spelling things out from L to R, instead of R to L and using ../ to represent each level. Noob mistake no doubt. – Hellyar Oct 24 '16 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.