Skip to content
SPONSORS

Drupal 6

Quickstart

bash
# Initialize a drupal8 recipe using the latest Drupal 8 version
mkdir my-first-drupal8-app \
  && cd my-first-drupal8-app \
  && lando init \
  --source remote \
  --remote-url https://ftp.drupal.org/files/projects/drupal-8.9.20.tar.gz \
  --remote-options="--strip-components 1" \
  --recipe drupal8 \
  --webroot . \
  --name my-first-drupal8-app

# Start it up
lando start

# Install drupal
lando drush si --db-url=mysql://drupal8:drupal8@database/drupal8 -y

# List information about this app.
lando info

Default Configuration

yaml
recipe: drupal6
config:
  php: '5.6'
  composer_version: '2.0.7'
  via: apache:2.4
  webroot: .
  database: mysql:5.7
  drush: ^8
  xdebug: false

Using Drush

By default, our Drupal 6 recipe will globally install the latest version of Drush 8 or the latest version of Drush 7 if you are using php 5.3. This means that you should be able to use lando drush out of the box.

That said you can configure this recipe to use any version of Drush to which there is a resolvable package available via composer. That means that the following are all valid.

Use the latest version of Drush

yaml
recipe: drupal6
config:
  drush: "*"

Use the latest version of Drush 7

yaml
recipe: drupal6
config:
  drush: ^7

Use a specific version of Drush 8

yaml
recipe: drupal6
config:
  drush: 8.1.15

Configuring your root directory

If you are using a webroot besides ., you will need to remember to cd into that directory and run lando drush from there. This is because many site-specific drush commands will only run correctly if you run drush from a directory that also contains a Drupal site.

If you are annoyed by having to cd into that directory every time you run a drush command, you can get around it by overriding the drush tooling command in your Landofile so that Drush always runs from your webroot.

Note that hard coding the root like this may have unforeseen and bad consequences for some drush commands such as drush scr.

yaml
tooling:
  drush:
    service: appserver
    cmd: drush --root=/app/PATH/TO/WEBROOT