I am very new to craft. installed craft3 very long ago, as a beginner, and trying to solve a long-lasted-issue with my url.

my goal:

My directory structure looks as below. As you can see, I installed craft only under public_html/mywebsite.com. I cannot move the files in /mywebsite.com into /public_html folder.

I researched and tried to follow this article however quiet unsure with the different folder structure I have. Just in case I moved index.html file to the /mywebsite.com root, and at least forbidden error was gone while only blanc page was loaded. I had the feeling that I could do something with index.php file to redefine('CRAFT_BASE_PATH', dirname(__DIR__));. However also not sure what to write..

Thanks a lot for your help in advance! my directory structure

2 Answers 2


This knowledge base article on moving Craft’s files below the webroot should help you.


The easiest way to do this would be to change the domains root directory from ../public_html to ../public_html/web, so that only the "web" directory is accessible from outside. This is also recommendable from a security standpoint.

Your Answer

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

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