Skip to content

Instantly share code, notes, and snippets.

@johnny-aroza
Last active August 16, 2025 09:37
Show Gist options
  • Select an option

  • Save johnny-aroza/ab1ef0db48118f156bf39ed25b509544 to your computer and use it in GitHub Desktop.

Select an option

Save johnny-aroza/ab1ef0db48118f156bf39ed25b509544 to your computer and use it in GitHub Desktop.
Lando - install in Mac

Install Brew :

Doc refer - https://docs.lando.dev/basics/installation.html#macos

Install Brew :

Refer - https://brew.sh/ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install lando using brew :

brew install --cask lando

Lando commands

  • setup lando app: lando init

  • start app: lando start

  • stop app: lando stop

  • Drop into the Mysql service as root:: lando ssh -s database

  • Drop into the Mysql server:: lando mysql

  • Import database(accepts both.sql and .gz): lando db-import <filename.sql>

  • Export database: lando export

  • App information: lando info

  • Destroy app(removes all databse and index): lando destroy

  • Share lando site lando share -u http://localhost:32785

  • Access mysql CLI lando mysql


lando cheatsheet


D7 settings.php

 $databases = array (
  'default' => 
  array (
    'default' => 
    array (
      'driver' => 'mysql',
      'database' => 'drupal7',
      'username' => 'drupal7',
      'password' => 'drupal7',
      'host' => 'database',
      'port' => '3306',

    ),
  ), 
);

D8 settings.php

$databases['default']['default'] = array (
  'database' => 'drupal8',
  'username' => 'drupal8',
  'password' => 'drupal8',
  'prefix' => '',
  'host' => 'database',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

lando.yaml for mailhog and phpmyadmin

name: appname
recipe: drupal10
config:
  webroot: web
  php: '8.1'
  via: nginx
  xdebug: false
  conf:
    # Tell Lando to use additional PHP settings.
    # The location of this file is arbitrary.
    # We placed it inside .vscode/ folder simply because we find it convenient.
    php: .vscode/php.ini
proxy:
  pma:
    - pma.appname.lndo.site
  mailhog:
    - mail.appname.lndo.site
services:
  pma:
    type: phpmyadmin
    hosts:
      - database
  mailhog:
    type: mailhog
    hogfrom:
      - appserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment