Lando - Two sites one configuration | Drupal 8

By kenneth, Fri, 08/23/2019 - 10:29

Authored on


There are different ways to configure your local environment. Then you should use the option is more suitable for you, of course. Lately I’ve been working using lando in order to build all my local environments. I really love how they expose their main idea about lando:

The main idea behind Lando is a user should be able to clone a repository, run a single command and get everything they need to work on their site locally in a few minutes. 

I faced different complex local configuration, where I need some extra containers and thankfully Lando provides you great documentation where you can check in order to configurare as you need to

Probably you already know that and you’re reading this because the article's title says that we can configure two sites in a single configuration or lando file to be precise, don’t you? Well yes!

It turns out this current site I have it locally configured by using lando. Back on Jun 23, 2019 I deployed the new looks and feel of this site:

It used to be so different than what it looks right now:


The main challenge to me, actually I am still struggling with that until now. I haven’t migrate all features to the new site. Basically because I chose to rebuild my old site to a new Drupal 8 instance instead. Then sometimes I need to jump into my own legacy site and do some stuff.

Then I thought I could have both sites locally into a single lando file configuration by using Lando proxy:
The I moved ahead and configure a new service and expose into lando, now I can run both sites locally into a single configuration.

Check how my ".local.yml" file looks like:

############$ cat .lando.yml 
name: keboca
recipe: drupal8
    type: php:7.1
    via: apache:2.4
    webroot: legacy
    type: node:latest
  webroot: www
  drush: global:8.1.12
    service: node

Both sites running together:


That said, I hope it helps you at some point somehow!
Happy coding!


Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.