Skip to main content
Image
banner-4_preview%20%281%29.jpeg

HowTo: Use Lando for Drupal installation

Drupal

What is Lando?

Lando free, open source, cross-platform, local development environment and DevOps tool built on Docker container technology.

It helps the users to:

  1. Integrate their systems with hosting providers such as pantheon, the users won't have to look around for third party alternatives to combine their local system with their hosting providers. It gives you that ability on your fingertips.
  2. Easily customise any functionality, tools or deployment options. It basically gives a user the power to extend and deploy any custom functionality with ease, and that’s something that makes it stand apart from traditional Drupal installation techniques.
  3. Store all the settings in a version control config which goes by the extension lando.yml. So that it’s easier for the user to make changes that would reflect on the whole site and does not have to look around for the different set of files.
  4. Gives the user an easy way to mimic their production environment locally. 

Before getting started you’d need to have it installed into your system.

  1. Before installing, make sure that you have updated your system with the latest version of Docker.
  2. You would need to install the latest stable docker compose binary and put it in the folder /usr/share/lando/bin after making it executable. 
Follow the steps below to install it on your local machine.

# Clone the Lando source
git clone https://github.com/lando/lando.git

# Install the dependencies
cd lando && yarn

# Optionally set up a symlink
sudo mkdir -p /usr/local/bin
sudo ln -s /absolute/path/to/above/repo/bin/lando.js /usr/local/bin/lando.dev

# Run lando
lando.dev

System Requirements

Unfortunately, you’d be able to use this method of Drupal installation on your local machine only if you have a fairly decent system configuration. According to the official Lando Documentation, You’d need at least :

  1. macOS 10.10 or ++
  2. Windows 10 or ++
  3. Linux ( kernel version 4.x ++)

Download Drupal

There are various methods to download Drupal, choose whichever method deems fit to you. I personally download Drupal from the ‘Download and Extend’ link on the Drupal Homepage. Save it in some empty directory according to this article /tmp.

Extract Drupal

On the terminal type the following commands that would extract the tar file and would put it in the location inside your home directory.

cd Sites

tar xzf /tmp/drupal-8.5.1.tar.gz

mv drupal-8.5.1 drupal-lando

cd drupal-lando

Initialise Lando

After extracting Drupal, it’s now time to initialise it and start working on it. The below command would create a minimal configuration file for you.

lando init --recipe drupal8 --webroot=. --name="drupal-lando"

The above command produces a lando.yml file, something of this sort.

name: drupal-lando

recipe: drupal8

config:

webroot:

It will also help you in finding out the available sub-commands. If you run the above-used command with no arguments, it would provide you with all the available sub-commands.

Kick off Docker Engine!

Start the terminal and type

lando start

If you would have done everything in order, it would start docker and create two containers for you.

Installing Drupal

If everything is on track until now you’re definitely in a position to install the Drupal site on your local machine. http://drupal-lando.lndo.site Since you’re using it without the database, the webpage would revert to the installation page.

Setting up database while installing Drupal

Carry on by accepting the default configuration, Fill out the details of the site and the database as you did for the local sites. In a while, you will have a working site in your local system.

Drupal Lando page

By now you must have realised the advantages of using it for Drupal installation. It is completely user-friendly and a boon for people who want to do things their way and aim to free themselves from the tyranny of local development products.

Contact us at [email protected] to get the best of Lando for your Drupal 8 site.

Subscribe

Ready to start your digital transformation journey with us?

Related Blogs

DrupalCon Singapore: It’s A Wind Up For 2024

DrupalCon Singapore Wind Up DrupalCon Singapore OpenSense Labs

OpenSense Labs team attended the DrupalCon Singapore 2024 and it was a wonderful and valuable experience, especially since it…

Drupal SDC: Advantages of Single Directory Components 

Advantages of Drupal SDC OpenSense Labs

What if one solution could organize website UI components, make them easy to reuse in different projects, ensure consistency…

Drupal 11 Upgrade: Checklist For Drupal 7 to 11 Migration 

Drupal 11 Upgrade Checklist OpenSense Labs

Drupal 10 was released in December 2022, and Drupal 11 upgrade arrived in just a year and a half. Drupal 11 came out early,…