I am struggling with the definition of CRAFT_BASE_PATH and CRAFT_VENDOR_PATH in web/index.php:

My absolute URLs are as follows:

/home/xxx/public_html/craft/ (not publicly accessible)


home/xxx/public_html/web/ (publicly accessible)

Thank you very much for your help!

1 Answer 1


You should almost never have to change these from the default settings.

All you need to do is make sure your webserver points to your server root properly (in your case, /home/xxx/public_html/web/)

The default Craft 3 install has web/ as the server root, with Craft and all of it's files/folders in the root directory. If you don't change anything, the index.php that ships with Craft will "just work" once you've pointed the webserver at the web root.

In your case, it sounds like you're saying that you've moved all of Craft into a craft/ directory that sits alongside the web/ directory. Assuming you've moved everything into that folder, you'd do something like this in your index.php:

// Project root path
$root = dirname(__DIR__).'/craft';

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.