Skip to main content

Installation on mijn.host hosting

Clone git repo first, then install Drupal, providing details manually to the installer.

composer install
./vendor/bin/drush site:install --locale="nl"

Make a note of the provided username and password.

Now export the crm user name and pass

set +o history
export CRM_DB_USER=
export CRM_DB_PASS=

Now install CiviCRM:

cms_url=$(pwd | awk -F "/" '{print $5}')
ln -s ../../libraries/civicrm public_html/libraries/civicrm
mkdir -p public_html/sites/default/files/civicrm/l10n/nl_NL/LC_MESSAGES
curl -Lss -o public_html/sites/default/files/civicrm/l10n/nl_NL/LC_MESSAGES/civicrm.mo https://download.civicrm.org/civicrm-l10n-core/mo/nl_NL/civicrm.mo
cd public_html
chmod +w sites/default/
set +o history
../vendor/bin/cv core:install --url="https://${cms_url}" --db="mysql://${CRM_DB_USER}:${CRM_DB_PASS}@localhost:3306/${CRM_DB_USER}" --lang="nl_NL"

Answer any question that pops up (e.g. db already populated) and run these commands to finish civicrm installation

set -o history
chmod -w sites/default/
cd ..
./vendor/bin/drush cr

Now some manual work:

WIth vi open settings.php file:

vi public_html/sites/default/settings.php

Edit the last row and change the provided path to ../config/sync

#E.g. change:
$settings['config_sync_directory'] = 'sites/default/files/config_7Mlw0xeTGW_fmBMDS-RmPr29yA3WsBBqcdHxMO_BE1S9DRichbda04ZmUQeV_yJD0tRu4Rk_dA/sync';
#into:
$settings['config_sync_directory'] = '../config/sync';

When done, load the site config with the following commands

site_id=$(cat site.id)
./vendor/bin/drush config:set system.site uuid $site_id -y
./vendor/bin/drush config:delete shortcut.set.default -y
nl_uuid=$(grep uuid ./config/sync/language.entity.nl.yml | awk '{print $2}')
./vendor/bin/drush config:set language.entity.nl uuid $nl_uuid -y
./vendor/bin/drush config:import -y