Skip to content

Instantly share code, notes, and snippets.

@axoplasm
Last active August 1, 2023 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axoplasm/096ec45ddcd9361aa9b471437ff2059b to your computer and use it in GitHub Desktop.
Save axoplasm/096ec45ddcd9361aa9b471437ff2059b to your computer and use it in GitHub Desktop.
Creating a local Drupal 7 site with Lando

very good documentation at https://docs.lando.dev/drupal/

  1. <install lando> per the instructions here
  2. $ lando init
  • follow the prompts as described here
  • Alternatively add Lando to an existing project with a bare-bones .lando.yml:
name: myproject
recipe: drupal7
config:
  webroot: .
  1. Download a recent DB & media backup from Pantheon
  2. Copy the DB to the LOCAL root for this site
  3. Copy the media files to /sites/default/files
  4. $ lando start
  5. $lando info — note the db settings (for the next step)
  6. Navigate to the URL reported by lando (something like http://my-site.lndo.site) — you should see the install.php screen
  7. use the following DB settings in the Install script, from the internal_connection and creds dictionaries):
  • database: drupal7
  • username: drupal7
  • password: drupal7
  • host: database (← this is where I got tripped up)
  • port: 3306
  1. Import your DB into the running container: $ lando db-import path/to/data/file
  2. $ lando drush cc all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment