This project contains a script which automatically downloads all the necessary modules and dependencies needed for installing CiviCRM on an existing D8 installation. Read the full blog here.
- Composer - not just the tool, but your Drupal 8 site should be using composer to manage dependencies.
- Bower - another package management tool. Yes, we are rich with package managers in this process.
- Git - Source control (managing the code that runs your site) is an essential part of every build, but particularly, it’s a requirement of Composer, because it uses that source control to lock down which packages you are building on.
-
Ensure that your ‘Vendor’ directory is outside of your document root. So your directory structure would be like this:
your_d8_site_directory └── composer.json └── composer.lock └── vendor └── web (your document root)
-
Create a backup of your database.
- Copy the
.env
,civicrm_setup.sh
files to the root of your project. - Run
civicrm_setup.sh
from the project root directorybash ./civicrm_setup.sh
- Now, go to the "Extend" page (at /admin/modules) and install the CiviCRM module.
- This will create a civicrm.settings.php in your /sites/default directory which contains information about where the database is, etc.
- This will also create all the necessary tables in your Drupal database.
- Logout of Drupal and log back in again.
- This is needed to sync your logged-in account with CiviCRM contacts.
- Get the Civi theme to apply by going to /civicrm/admin/setting/url?reset=1 and set the CiviCRM Resource URL to /libraries/civicrm and click “Save”.
And you are done!
This file contains variables necessary for civicrm_setup.sh
such as the CiviCRM version, doc root, etc.