Skip to content

Instantly share code, notes, and snippets.

@isramv
Last active October 12, 2018 16:58
Show Gist options
  • Save isramv/babd9103b77a14f32456440c33dc94b0 to your computer and use it in GitHub Desktop.
Save isramv/babd9103b77a14f32456440c33dc94b0 to your computer and use it in GitHub Desktop.
drupal 8 lando quickstart

How to quickstar a Drupal8 site for local dev with lando

composer create-project drupal-composer/drupal-project:8.x-dev d86 --stability dev --no-interaction

cd d86

lando init

? What recipe do you want to use? drupal8 ? Where is your webroot relative to the init destination? web ? What do you want to call this app? d-86

open the .lando.yml file and add the following line: php: 7.2 to the end of the file.

name: d-86
recipe: drupal8
config:
  webroot: web
  php: '7.2'

if you want to change php to 7.2 do:

lando rebuild

the following are the default credentials for drupal in lando:

"creds": {
    "user": "drupal8",
    "password": "drupal8",
    "database": "drupal8"
  },
  "internal_connection": {
    "host": "database",
    "port": 3306
  }
}

follow the instrucctions on https://d86.lndo.site

Enable xdebug

add xdebug to the endo of the .lando.yml file

name: d-86
recipe: drupal8
config:
  webroot: web
  php: '7.2'
  xdebug: true

and then execute: lando rebuild

edit the .lando.yml

Enabe theme development.

download the following files and place them in web/sites/default folder

Un comment the following in settings.php

# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
#   include $app_root . '/' . $site_path . '/settings.local.php';
# }

Get the following two files:

local.services.yml

settings.local.php

now clear the cache:

lando drush cr

git init

git init on the root.

profit!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment