This tutorial explains how to install an existing Drupal 9 website locally with Lando.
So I first cloned my repository
git clone <my-repository>
composer install
This will install all the vendor packages etc
lando init --source cwd --recipe drupal9 --webroot web --name stefvanlooveren
lando start
lando drush si --db-url=mysql://drupal9:drupal9@database/drupal9 --account-pass=content -y
If drush was not working at this stage, do the command below and after this the command above again:
lando rebuild
Output should now look as this:
[notice] Starting Drupal installation. This takes a while.
[notice] Performed install task: install_select_language
[notice] Performed install task: install_select_profile
[notice] Performed install task: install_load_profile
[notice] Performed install task: install_verify_requirements
[notice] Performed install task: install_settings_form
[notice] Performed install task: install_verify_database_ready
[notice] Performed install task: install_base_system
[notice] Performed install task: install_bootstrap_full
[notice] Performed install task: install_profile_modules
[notice] Performed install task: install_profile_themes
[notice] Performed install task: install_install_profile
[notice] Performed install task: install_configure_form
[notice] Cron run completed.
[notice] Performed install task: install_finished
[success] Installation complete.
I have a default installation available at myproject.lndo.site !
lando db-import backup.mysql
Voila, visit your site and you are ready.