Drupal 7 Landoize an Extant App
If you and your team have an existing Drupal 7 application that you would like to use Lando for local development you just need to add a
.lando.yml configuration file
to the project and commit it to git.
First in a terminal move to the directory that contains your Drupal 7 project:
Then use the
lando init command to build your
Lando will ask you
From where should we get your app's codebase? select
current working directory.
Then Lando will ask you
What recipe do you want to use? select
Then Lando needs to know what directory has the Drupal code it asks
Where is your webroot relative to the init destination? If your
code is in the current directory you can just hit enter.
Nested Web Root
If you are using a nested web root then you should
specify the path to the Drupal code here like:
Then Lando prompts for the app name:
What do you want to call this app? you can type anything you like, i.e. MyApp.
lando init command will create the
.lando.yml config file for you. If you chose the
drupal7 recipe your config file should look like this:
name: myapp recipe: drupal7 config: webroot: .
Now you are ready to start your app.
This will build out the containers necessary for your Drupal 7 app. You'll end up with a screen like this once the app is started:
Now you can copy any one of the resulting URLs and paste it into a browser to visit your Drupal 7 app running in Lando!
If you issue additional terminal commands or clear the screen you can get the URLs and other info about your app anytime by using the
lando info command:
The info command will give you lots of useful information about your app: