Skip to main content

Local Development (DDEV)

Pre-steps

New Git repo:

    Initialize new repo. Take care that repo directory is empty, only .git should be there. Run:
    ddev config --project-type=drupal11 --docroot=public_html
    ddev start
    ddev composer create drupal/recommended-project:^11 --no-install
    sed -i 's/web\//public_html\//' composer.json
    ddev composer install
    ddev composer require drush/drush
    ddev drush site:install --account-name=admin --account-pass=admin --locale=nl -y
    ddev drush config:get system.site uuid | awk '{print $2}' > site.id # Obtaining site.id for publishing site config to tst/prd
    sed -i "s/# \$settings\['config_sync_directory'\] = '\/directory\/outside\/webroot';/\$settings\['config_sync_directory'\] = '..\/config\/sync';/" public_html/sites/default/settings.php
    ddev drush config:export
    ddev launch $(ddev drush uli)
      Initialize new repo. Take care that repo directory is empty, only .git should be there. Run:
      When the website is launched, change the password if deemed necessary
      Add .gitignore stuffwith:
      .ddev/
      public_html/
      recipes/
      vendor/
      

      Existing Repo:

      1. Clone the repo
      2. Verify composer.json (web root = pubclic_html)
      3. Run:
        ddev config --project-type=drupal11 --docroot=public_html
        ddev start
        ddev composer install
        ddev drush site:install --account-name=admin --account-pass=admin --locale=nl -y
        ddev launch $(ddev drush uli)