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 ?

1 Answer 1


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 :)

  • Thank you Jon, this helps me ;-). I have a more standard configuration of D8 this way.
    – Ichi
    Apr 17, 2019 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.