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.
You need to download Docker from official website:
To install Docker on Ubuntu/Debian use official documentation:
After you installed Docker, install Lando.
To install Lando use official documentation:
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
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:
For getting database credential use lando info command:
I have these database credentials:
Database user: drupal9
Database password: drupal9
Database name: drupal9
Be sure, that you replaced Host from localhost with database.
Next you need to fill form with administrator username and password:
After that, your site will be installed and you can continue setting up Drupal:
Actual information about Drupal installation with Lando you can find in official documentation: