When I do composer create-project craftcms/craft, it will create a web folder. My webroot is called public_html though. Can I change this somehow, or should I make a symlink?
Or simply don't use composer to install in that case?
When I do composer create-project craftcms/craft, it will create a web folder. My webroot is called public_html though. Can I change this somehow, or should I make a symlink?
Or simply don't use composer to install in that case?
You can just rename web/ to public_html/, or move all the files inside web/ into public_html/. (Don’t forget to move the .htaccess and .env files, if the latter.)
As long as the location of the public_html/ folder is in the same place as the web/ folder was, you don’t need to change anything else.
my-project.test/
├── config/
├── ...
└── public_html/
├── index.php
└── ...
If you need to change the location to something like this:
my-project.test/
├── craft/
│ ├── config/
│ └── ...
└── public_html/
├── index.php
└── ...
Then just make sure that your CRAFT_BASE_PATH constant points to the right base path (craft/).
// old:
define('CRAFT_BASE_PATH', dirname(__DIR__));
// new:
define('CRAFT_BASE_PATH', dirname(__DIR__) . '/craft');
composer updatefor later maintenance? – Urs Aug 23 '18 at 13:48/vendor. All my projects use/publicinstead of/web. – Jay Aug 23 '18 at 13:50home/craft(withconfig,modules,storage,templateandvendor, not accessible via web),home/public_html(with the content ofweband a modifiedCRAFT_BASE_PATH)? – Urs Aug 23 '18 at 13:59CRAFT_BASE_PATHconstant inpublic_html/index.phpis pointed at thecraft/folder. – Brandon Kelly Aug 23 '18 at 16:08