Answers.Body: <p>In your project root is a hidden <code>.ddev</code> directory. Inside of that directory, edit the <code>config.yaml</code> file and change <code>docroot: web</code> to <code>docroot: htdocs</code>.</p>
  <p>Restart DDEV.</p>
  <p>You'll also need to update your Craft <code>.env</code> file, so it knows the new web root. Change <code>CRAFT_WEB_ROOT=&quot;/var/www/html/web&quot;</code> to <code>CRAFT_WEB_ROOT=&quot;/var/www/html/htdocs&quot;</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-05-06T14:41:40.290Z
Answers.LastActivityDate: 2024-05-06T14:41:40.290Z
Answers.UserDisplayName: CraftQuest
Body: <p>For a Craft CMS 5 project installed with ddev, how can we make the webroot folder become <code>/htdocs</code> instead of <code>/web</code>?</p>
  <p>Is this something to be reconfigured after installation, or does it need to be done strictly during installation?&quot;</p>
  
Tags: <install><craft5><ddev>
Title: Setup Craft CMS 5 webroot to htdocs
ThreadText: # Setup Craft CMS 5 webroot to htdocs
  
  (Asked by: username_0 on 2024-05-06)
  
  For a Craft CMS 5 project installed with ddev, how can we make the webroot folder become `/htdocs` instead of `/web`?
  
  Is this something to be reconfigured after installation, or does it need to be done strictly during installation?"
  
  **Tags:** install, craft5, ddev
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-05-06. Score: 2 | Accepted answer
  
  In your project root is a hidden `.ddev` directory. Inside of that directory, edit the `config.yaml` file and change `docroot: web` to `docroot: htdocs`.
  
  Restart DDEV.
  
  You'll also need to update your Craft `.env` file, so it knows the new web root. Change `CRAFT_WEB_ROOT="/var/www/html/web"` to `CRAFT_WEB_ROOT="/var/www/html/htdocs"`.
  
  
  ---
  
  