With the recent announcement of the end of life for Dev Desktop. Acquia recommends using the Acquia Cloud IDE as the preferred method for local development.
If you’re not able to use Cloud IDE, Acquia provides limited integration with Lando, which is a Docker-based local environment.
You will still be running everything inside of a container, but instead of using Vagrant and Virtualbox you will use Docker. All commands will be run on your local machine with the Lando wrapper.
If you have been using the DrupalVM and want to switch an existing project from the DrupalVM to Lando see the notes below.
Switching from DrupalVM to Lando with BLT v.11 on an existing project.
System Requirements (at the time of writing this article):
- BLT: ^11.x If you want to use BLT 12.x see this article. https://support.acquia.com/hc/en-us/articles/360045796154-Upgrading-from-BLT-11-to-BLT-12
- Lando: If you do not have Lando installed view these docs
- Docker: ^Docker version 20.10.2
- Operating System: OS 10.14.6 or higher (adjust accordingly if you are on Windows)
Step 0: Back up anything you need from your VM
Since we are going to be destroying your VM instance save any custom configuration you might want to save for later.
Step One: Remove DrupalVM configuration
1a) Destroy your vagrant instance
Open a terminal window and navigate to your project and run the following commands
blt vm:nuke
1b) Check your local.blt.yml file for any VM configuration, if so remove it.
1c) Remove DrupalVM composer dependency from composer.json and update your lock file
composer remove geerlingguy/drupal-vm
composer update
1d) Remove the /box directory
1e) Remove the Vagrantfile file
Step Two: Add Lando configuration
2a) Add the blt-lando plugin
composer require mikemadison13/blt-lando
composer update
Run BLT Lando recipe to create your Lando configuration for you.
blt recipes:vm:lando
Review your lando.yml file.
2b) Change your hostname in your blt.yml file
Open your blt.yml
file and change your hostname to
# This will be used as the local uri for all developers.
local:
protocol: http
hostname: ${project.machine_name}.lndo.site
Step Three: Update your database information
3a) Review or update local.blt.yml to add the following. (Change to drupal9 if you are using Drupal 9) .
drupal:
db:
database:drupal8
username: drupal8
password: drupal8
host: database
project:
local:
protocol: http
hostname: '${project.machine_name}.lndo.site'
3b) Regenerate your local BLT settings
lando blt blt:init:settings
Step Four: BLT setup with Lando
lando blt setup
Then drush uli into your website
lando drush uli
Other Troubleshooting techniques and commands to know
Lando
See Lando’s docs about troubleshooting.
Rebuild your VM instance lando rebuild
Shut down your lando instancelando poweroff
Start your lando instancelando start
Composer issues
composer clear-cache
export COMPOSER_PROCESS_TIMEOUT=2000
Delete the vendor directory and core directory before running composer update
BLT
Print BLT commands in your terminallando blt
Diagnose issues with BLT doctorlando blt doctor