Answers.Body: <p>You can just rename <code>web/</code> to <code>public_html/</code>, or move all the files inside <code>web/</code> into <code>public_html/</code>. (Don’t forget to move the <code>.htaccess</code> and <code>.env</code> files, if the latter.)</p>
  
  <p>As long as the location of the <code>public_html/</code> folder is in the same place as the <code>web/</code> folder was, you don’t need to change anything else.</p>
  
  <pre><code>my-project.test/
  ├── config/
  ├── ...
  └── public_html/
      ├── index.php
      └── ...
  </code></pre>
  
  <p>If you need to change the location to something like this:</p>
  
  <pre><code>my-project.test/
  ├── craft/
  │   ├── config/
  │   └── ...
  └── public_html/
      ├── index.php
      └── ...
  </code></pre>
  
  <p>Then just make sure that your <code>CRAFT_BASE_PATH</code> constant points to the right base path (<code>craft/</code>).</p>
  
  <pre class="lang-php prettyprint-override"><code>// old:
  define('CRAFT_BASE_PATH', dirname(__DIR__));
  
  // new:
  define('CRAFT_BASE_PATH', dirname(__DIR__) . '/craft');
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T13:48:39.310Z
Answers.Text: But won't that break `composer update` for later maintenance?
Answers.UserDisplayName: Urs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T13:50:19.460Z
Answers.Text: No it won't. Composer update installs everything into `/vendor`. All my projects use `/public` instead of `/web`.
Answers.UserDisplayName: Jay
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T13:59:42.457Z
Answers.Text: Ok! So that would also be a valid setup: `home/craft` (with `config`, `modules`, `storage`, `template` and `vendor`, not accessible via web), `home/public_html` (with the content of `web` and a modified `CRAFT_BASE_PATH`)?
Answers.UserDisplayName: Urs
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T16:08:00.597Z
Answers.Text: In that case just make sure that the `CRAFT_BASE_PATH` constant in `public_html/index.php` is pointed at the `craft/` folder.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T16:12:04.637Z
Answers.Text: Just updated my answer to show what that would look like.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-23T12:56:29.897Z
Answers.LastActivityDate: 2018-08-23T16:11:49.957Z
Answers.LastEditDate: 2018-08-23T16:11:49.957Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>When I do <code>composer create-project craftcms/craft</code>, it will create a <code>web</code> folder. My webroot is called <code>public_html</code> though. Can I change this somehow, or should I make a symlink? </p>
  
  <p>Or simply don't use composer to install in that case?</p>
  
Tags: <install><composer>
Title: Craft install via composer: install to public_html?
ThreadText: # Craft install via composer: install to public_html?
  
  (Asked by: username_0 on 2018-08-23)
  
  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?
  
  **Tags:** install, composer
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-23. Score: 8 | Accepted answer
  
  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/`).
  
  ```php
  // old:
  define('CRAFT_BASE_PATH', dirname(__DIR__));
  
  // new:
  define('CRAFT_BASE_PATH', dirname(__DIR__) . '/craft');
  
  ```
  
  > **Comments:**
  > **username_0**: But won't that break `composer update` for later maintenance?  
  > **username_2**: No it won't. Composer update installs everything into `/vendor`. All my projects use `/public` instead of `/web`.  
  > **username_0**: Ok! So that would also be a valid setup: `home/craft` (with `config`, `modules`, `storage`, `template` and `vendor`, not accessible via web), `home/public_html` (with the content of `web` and a modified `CRAFT_BASE_PATH`)?  
  > **username_1**: In that case just make sure that the `CRAFT_BASE_PATH` constant in `public_html/index.php` is pointed at the `craft/` folder.  
  > **username_1**: Just updated my answer to show what that would look like.  
  
  ---
  
  