11/05/2020, by Ivan Abramenko

There are opinions that Drupal is complicated platform and it's hard to install and set up Drupal. But Drupal is under active development more than 20 years and for this time all approaches to install and set up Drupal are being constantly improved. Now you can install Drupal with Docker on virtual environment. Let's use Lando and install Drupal for 10 minutes.

For the start we need to isntall web server where Drupal will work. But to set up web server from separate parts and packages will take more time than 10 minutes, so we will use out-of-the-box soluiton and unpack virtual machine with Docker. This virtual machine will work as fast as usual local web server without virtualization. 

To set up web server on virtual environment we need to use Docker and Lando. Firstly install Docker.

Docker installation

You need to download Docker from official website:

https://www.docker.com/

https://www.docker.com/products/docker-desktop

To install Docker on Ubuntu/Debian use official documentation:

https://docs.docker.com/engine/install/ubuntu/

After you installed Docker, install Lando.

Docker version

Lando installation

To install Lando use official documentation:

https://docs.lando.dev/basics/installation.html

Lando version

Install Drupal with Lando

Now go to the folder you want to install Drupal and let's install Drupal. You will need to use these three commands:

# Initialize a drupal9 recipe using the latest drupal 9 version
lando init \
  --source remote \
  --remote-url https://www.drupal.org/download-latest/tar.gz \
  --remote-options="--strip-components 1" \
  --recipe drupal9 \
  --webroot . \
  --name my-first-drupal9-app

# Start it up
lando start

# List information about this app.
lando info

Lando Drupal

Every time you will need your local site you can use command lando start, and when you want to switch off you site you will use lando stop command.

Let's execute lando start command. Docker will download required images and set up your environment for a new Drupal site.

After that you sill will work on address: http://my-first-drupal9-app.lndo.site:8000/, you need to choose your language and continue installation:

Drupal installation

For getting database credential use lando info command:

lando info

I have these database credentials:

Database user: drupal9
Database password: drupal9
Database name: drupal9
Host: database

Drupal DB credentials

Be sure, that you replaced Host from localhost with database.

Next you need to fill form with administrator username and password:

Drupal admin

After that, your site will be installed and you can continue setting up Drupal:

Drupal 9 installed

Actual information about Drupal installation with Lando you can find in official documentation:

https://docs.lando.dev/config/drupal9.html

Did this help?

Why wasn't this information helpful

Limit to 250 characters.