Step By Step Guide To Create Multi-Site In Drupal With Lando

Shubham Pareek· Cofounder and CEO of Appic Softwares
Updated:
Step By Step Guide To Create Multi-Site In Drupal With Lando | Appic Softwares

This tutorial will teach us how to set up Drupal multi-site utilizing Lando, with a shared (single) codebase and a different database for each site on a local computer.

Defining Lando

Lando can be considered a Docker Compose tool as well as an abstraction layer and superset of the latter. Lando, as an abstraction layer, significantly lowers the difficulty of spinning up containers
by defining “sane defaults” and exposing only the configura
in the USA

tion that is pertinent to a particular “service.”.

When should I think about having many sites?

  • Let’s first examine when a multi-site setup is appropriate before delving into the technical aspects of doing so.
  • The arguments provided and the Pros & Cons listed below will assist you in determining whether or not multi-site is appropriate for your sites.

Pros:

  • Simple to keep up:
  • Reduced expense of development:
  • Assign distinct features and themes to every website:

Cons:

  • lone point of failure:
  • Site traffic control:

Please be aware that we won’t be going over how to install Lando. For further information, view the official Lando document.

Steps To Create Multi-Site In Drupal With Lando

Step 1: let’s configure a multi-site using Lando.

  • Lando utilizes a configuration file, which enables us to launch many services and ensure optimal operation of our program. Normally, all that would be required to run lando and Drupal without any issues would be to run the lando init command. This configuration file would then be generated automatically.
  • In the event of a Drupal Multi-site installation, on the other hand, we will need to generate our own Lando configuration file and adjust it to suit our requirements, including the URLs for our subdomains and the access information for every database, among other things.
  • While numerous additional configurations can be added to a project of this kind, I’ll provide you with the basic file below, along with an explanation of each area that’s crucial, so you can use Lando to launch multiple Drupal sites. Open the folder from which you obtained the Drupal Base files, and use the following code to create a file called.lando.yml:

Drupal With Lando | Appic Softwares

Explanation:

  • The project name and the primary web root configurations are located in the first section of the configuration file.

Drupal With Lando | Appic Softwares

  • The Proxy section is where we will specify the various domains for our Drupal sites. As with a standard Drupal Multi-site installation, the main name of each domain must match its installation folder.

Drupal With Lando | Appic Softwares

  • All of the data about our databases will be defined in the final section of the configuration file. Keep in mind that you may use the information command to verify all the details once Lando has started:

Drupal With Lando | Appic Softwares

Step 2 – Configuring the multi-sites and main Drupal

At this stage, we need to make a few tweaks before we begin our Drupal project:

  • The file example.sites should be renamed to sites and the folders that each of the example domains w
    ill point to must be added inside.

Drupal With Lando | Appic Softwares

Drupal With Lando | Appic Softwares

  • Make the folders with the names that match the domain names you specified in the configuration file. The folder names must match the names you entered in the sites file from the previous image and the lando configuration file.

Drupal With Lando | Appic Softwares

  • Configuration files can be added to many sites. Two files are necessary for every Drupal installation to be configured: the files folder, which contains all of the files, images, cache, and other data, and the settings file, which defines all of the database access information. As a result, you will need to duplicate the model from the default.settings file located inside the sites/default folder and rename it to settings inside each of your multi-site folders. Within each folder, you will next create a files folder.

Drupal With Lando | Appic Softwares

  • Allow the /files and settings directories to exist after each site folder has been created.
chmod a+w settings
chmod a+w files
  • We can now begin installing each of our Drupal Multi-sites since we have all the required files. To prevent any surprises, we should run the following tasks in this order:
lando start
lando composer install
lando rebuild
lando info
  • We will make sure that Lando boots properly by using the configuration we have specified in the.lando.yml configuration file with the “lando start” command.
  • Since there will be missing main folders like Vendor in the files, the command “lando composer install” will begin downloading the remaining dependencies needed to install our Drupal.
  • The command “lando rebuild” examines the application in general. After the Composer has finished downloading the files, the command should display the various URLs that are accessible for each of the several sites on the screen.

Drupal With Lando | Appic Softwares

  • You will be directed to the Drupal install page when you click on any of the aforementioned site URLs.

Drupal With Lando | Appic Softwares

Create Multi-Site In Drupal With Lando | Appic Softwares

  • We may verify database access information, including user names and passwords, with the use of the “Lando info” command.
  • After completing the previous instructions, we can start installing each multi-site by writing the corresponding domain that we have specified in the lando configuration file and verifying by running the “Lando info” command. Recall that the database server’s local host must be changed to the one that shows in the terminal if you install Drupal via Lando.

Create Multi-Site In Drupal With Lando | Appic Softwares

  • Your multi-site installation is now complete. You can use the following to access databases across several sites:
  • Here, after Lando starts, the site URL created above is accepted by -uri. You can now continue working on your many sites and access their database.

Create Multi-Site In Drupal With Lando | Appic Softwares

Conclusion

We hope that through this post you were able to learn how to integrate Drupal with Lando, Moreover, if you are looking to hire dedicated Drupal developers who can assist you in managing your development, then you should check out Appic Softwares.

We have experienced and pre-vetted Drupal developers who will assist you with its development and maintenance.

So, what are you waiting for? Hire us now!

This blog has been inspired by <https://www.specbee.com/blogs/getting-started-with-lando-and-drupal-9>

Related Articles

How To Integrate Drupal With Apache Solr | Appic Softwares
12/11/2023

How To Integrate Drupal With Apache Solr

Understanding Apache Solr The Apache Software Foundation created the open-source search engine known as Apache Solr. It provides strong search and indexing capabilities for webpages, databases, and other content, built on the Apache Lucene framework. You can integrate your website with Solr if you use Drupal. The Search API Solr Search module powers the Solr […]

Read More
Google Tag Manager With Drupal | Appic Softwares
12/13/2023

How To Integrate Google Tag Manager With Drupal 9?

The marketing tags on your website are managed with Google Tag Manager. It provides a number of benefits, including the ability to create tags, integrate with Google Analytics tools easily, load faster, and show fired tags. What is a tag? A tag is a web code that can be found on a page. The code […]

Read More
How To Add Google Analytics With Drupal In 2024?
12/11/2023

How To Add Google Analytics With Drupal In 2025?

Google Analytics is a web analytics service that enables marketers and website owners to monitor and evaluate several elements of user behavior and website performance. Moreover, if you’re looking for steps to add Google Analytics with Drupal then you are at the right place.  It offers insightful information about how people use a website, their […]

Read More
Step-By-Step Guide To Update Drupal Core With Composer
12/14/2023

Step-By-Step Guide To Update Drupal Core With Composer

Updating the Drupal core and adding modules to the most recent version that has been released is best practice. Let’s get started with updating the core of Drupal. Although there are several approaches to upgrading the core, we are only talking about it with the composer at this time. Using Composer is also advised when […]

Read More
hiring Drupal developers
1/5/2024

The Hourly Rate Of Hiring Drupal Developers From India

Do you know total of 469,323 live Drupa l websites are running across the globe? If you too have a Drupal website or are planning to create one and want to know the hourly rate of Hiring Drupal developers from India, then you are at the right place.  Check out the content of this post […]

Read More
Offshore Software Development India vs Eastern Europe (2026)
10/27/2026

Offshore Software Development India vs Eastern Europe (2026)

India is cheaper and larger; Eastern Europe shares more of the working day with the UK and US East Coast. This 2026 guide compares rates, talent, overlap, data law and risk so you can choose.
Read More