2

I have a website setup in Craft multi-environment config for git workflow with a development branch automatically deploying via deploybot from a bitbucket repository. I want to add an additional live server for manual deployment via deploybot, but I'm concerned about the folder structure. I know the public folder in Craft is just a stand in for web_root, but if I allow git to deploy to the server root, won't it try to make a new public folder by default?

Staging setup /home/user/public_html/staging/public/index.php

Live site /home/user/public_html/index.php instead of /home/user/public/index.php

I have seen where I can add a symlink to point one folder to another, but I don't think I can point public_html to a new public folder as I have other subdomains stored in public_html. Should I just rename public in my Craft files to public_html in the local and staging files, or can I symlink public to public_html without abandoning my existing files?

3

Generally, you can make the Craft public folder whatever you want it to be. That allows you to deploy to any folder you like.

For example, I deploy to a public_html on one server, public on another and web on another server. Each of those directories are the web root of their respective site.

The only thing(s) within the public (or whatever you call it) directory is/are the index.php file (and whatever other js/css etc type files) you may have. As long as you can tell that file where the craft directory is (usually one level above the web root) - you should be golden!

| improve this answer | |

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.