so I have Craft installed in a directory called 'cms' which is above webroot, I changed the main index file to use;

require dirname(__DIR__) . '/cms/bootstrap.php';

The main reason for this is because there's a fairly explicit open_basedir restriction on the server and we have only been allowed to have one folder added to the list (cms in this case)

Everything works as expected except for when we try and manage plugins through the web admin, it seems to be looking in the user root for .composer etc. when really it should be looking in ~/cms/

Struggling to work out where I can set this path?

1 Answer 1


When diverging from Craft's default folder structure, you'll likely want to define a few of the relevant Craft PHP constants. The best place to do that, is at the top of your project's bootstrap.php file, which is used both when Craft is ran over HTTP (i.e. via the web root's index.php entry file) and when using the CLI (i.e. for console commands).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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