Answers.Body: <p>Drupal itself doesn't care about its folder name (at least, not that I've found).  CiviCRM cares, and so does Composer.</p>
  
  <ul>
  <li><p>When you rename your folder, find the <code>installer-paths</code> section in <code>composer.json</code> (in the webroot) and change <code>docroot</code> to <code>web</code> there.  </p></li>
  <li><p>You'll also need to change all instances of <code>docroot</code> in civicrm.settings.php.</p></li>
  <li><p>Rebuild your Drupal cache and flush Civi caches as well.  </p></li>
  <li><p>If you have absolute paths (that is, not using tokens like <code>[cms.root]</code>) in Civi's <code>Administer » System Settings » Directories</code> or <code>Administer » System Settings » Resource URLs</code> menus, change those too. </p></li>
  <li><p>Of course, don't forget to change your web server configuration :)</p></li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-17T22:09:16.057Z
Answers.Text: Thank you Jon, this helps me ;-). I have a more standard configuration of D8 this way.
Answers.UserDisplayName: Ichi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-17T21:53:55.410Z
Answers.LastActivityDate: 2019-04-17T21:53:55.410Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I encounter lot of issues with CiviCRM on a Drupal 8 production site :</p>
  
  <p>When sending a mailing there is :
  - No tracking of opened mail
  - No indication of click through
  There is another issue with the cron that doesn't run.</p>
  
  <p>The issue might concern the root directory D8 that is the non standard <strong>docroot</strong> instead of the <strong>web</strong> directory.
  This can be a direction for this issue as the installation roundearth of David Snopek's. It is based (or used to be) on the <strong>web</strong> directory </p>
  
  <p>What is the best practice to move the root directory ?</p>
  
Tags: <civimail><drupal-8>
Title: Change the root directory D8 [docroot > web]
ThreadText: # Change the root directory D8 [docroot > web]
  
  (Asked by: username_0 on 2019-04-17)
  
  I encounter lot of issues with CiviCRM on a Drupal 8 production site :
  
  When sending a mailing there is :
  - No tracking of opened mail
  - No indication of click through
  There is another issue with the cron that doesn't run.
  
  The issue might concern the root directory D8 that is the non standard **docroot** instead of the **web** directory.
  This can be a direction for this issue as the installation roundearth of David Snopek's. It is based (or used to be) on the **web** directory
  
  What is the best practice to move the root directory ?
  
  **Tags:** civimail, drupal-8
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-04-17. Score: 2 | Accepted answer
  
  Drupal itself doesn't care about its folder name (at least, not that I've found). CiviCRM cares, and so does Composer.
  
  * When you rename your folder, find the `installer-paths` section in `composer.json` (in the webroot) and change `docroot` to `web` there.
  * You'll also need to change all instances of `docroot` in civicrm.settings.php.
  * Rebuild your Drupal cache and flush Civi caches as well.
  * If you have absolute paths (that is, not using tokens like `[cms.root]`) in Civi's `Administer » System Settings » Directories` or `Administer » System Settings » Resource URLs` menus, change those too.
  * Of course, don't forget to change your web server configuration :)
  
  > **Comments:**
  > **username_0**: Thank you Jon, this helps me ;-). I have a more standard configuration of D8 this way.  
  
  ---
  
  