If you’re a Drupal developer, you know it’s a headache to set up local Drupal development sites. As you know, Drupal hosting comes in a variety of flavors, and it’s cumbersome to match each local development site with the production site. That’s why we, as an agency, prefer Pantheon for all customer production sites.
Pantheon helps streamline our website development efforts with unrivaled speed, uptime, and scalability, making Pantheon’s high-performance hosting platform the best place to host Drupal sites and applications. Developers often struggle with local development, delaying solutions to client problems with non-billable time. While searching for an answer, we found Lando. Lando has us up and running in moments with its tight integration with Pantheon, enabling our agency to test anything in a local environment that closely matches Pantheon.
Developers often struggle with local development, delaying solutions to client problems with non-billable time. — Erik Cochran, CTO, Molly Duggan
Get Started with Lando
If you are already using Pantheon and assuming you’re already using Terminus, getting started with Lando is easy. Follow these instructions to install Lando today.
Install with Brew $ brew cask install lando or find a specific version at https://github.com/lando/lando/releases
After installation, go to Pantheon and create a new token to use with Terminus and Lando. Then copy the token script and run it in your terminal twice: $ terminus auth:login --machine-token=[UniqueToken] and once more with lando in front $ lando terminus auth:login --machine-token=[UniqueToken]
If you have a site downloaded from Pantheon on your local machine, all you need to do is $ cd [PantheonSiteDirectory] and run $ lando init --recipe pantheon and walk through the prompts.
If you want to use Lando to grab a Pantheon site and build it on your local, the command is slightly different. In your terminal, run $ lando init pantheon and walk through the prompts.
Now you’re ready to develop with Lando. Some commands you’ll need to know are:
$ lando push = Push a code commit and optionally push the database and files.
$ lando pull = Options to pull code from DEV and database and files from any environment including multidevs
$ lando list = Get URL’s for the local site and publicly accessible domains sharing your builds.
Lando can speed up your local development efforts and cut the time it takes to deploy changes to your production website. If you’re an enterprise organization struggling with local development, visit drupal.mollyduggan.com and learn how we can help you.
If you're ready to make the next move and upgrade to Drupal 8, you'll want to see this.