{"id":57406,"date":"2023-05-31T13:47:57","date_gmt":"2023-05-31T08:17:57","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=57406"},"modified":"2023-05-31T13:47:57","modified_gmt":"2023-05-31T08:17:57","slug":"learn-how-to-configure-drupal-with-lando","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/learn-how-to-configure-drupal-with-lando\/","title":{"rendered":"Learn how to configure Drupal with Lando"},"content":{"rendered":"<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">What is Lando?<\/h2>\n<p>&#8220;Lando is a free, open-source, cross-platform, local development environment and DevOps tool built on Docker container technology. It is mainly designed to work with most major languages, frameworks, and services. Lando provides an easy way for developers of all skill levels to specify simple or complex project requirements and then quickly get to work on them.&#8221;<\/p>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">Some of the benefits of Lando<\/h2>\n<ul>\n<li>Mimicking your production environment locally<\/li>\n<li>Offering speedy development with the prebuilt configuration of the composer, drush<\/li>\n<li>Add tooling to extend it from services like phpmyadmin, PHP, mailhog, apache, etc<\/li>\n<li>Recommends customizable out-of-the-box settings.<\/li>\n<li>Using a single local development environment for all your projects<\/li>\n<\/ul>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">System Requirements<\/h2>\n<p style=\"padding-bottom: 0;\">Following are some basic guidelines for your smooth Lando experience:<\/p>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Operating System<\/h3>\n<ul>\n<li>macOS 11 or later<\/li>\n<li>Windows 10 Home or Pro version 21H2 or higher with the\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/wsl\/install-win10\" target=\"_blank\" rel=\"noopener\">WSL 2 feature enabled<\/a><\/li>\n<li>Linux with kernel version 4.x or higher<\/li>\n<\/ul>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Docker Engine Requirements<\/h3>\n<p>A Docker engine is required to run Lando. Based on operating system requirement varies as follow:<\/p>\n<ul>\n<li>Linux Docker engine\u00a0<a href=\"https:\/\/docs.docker.com\/engine\/installation\/linux\" target=\"_blank\" rel=\"noopener\">requirements<\/a><\/li>\n<li>Docker Desktop for Mac\u00a0<a href=\"https:\/\/docs.docker.com\/desktop\/mac\/install\/\" target=\"_blank\" rel=\"noopener\">requirements<\/a><\/li>\n<li>Docker Desktop for Windows\u00a0<a href=\"https:\/\/docs.docker.com\/desktop\/windows\/install\/\" target=\"_blank\" rel=\"noopener\">requirements<\/a><\/li>\n<\/ul>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">Hardware Requirements<\/h2>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Minimum requirements<\/h3>\n<ul>\n<li>2-core x86-compat processor<\/li>\n<li>4GB+ RAM<\/li>\n<li>25GB+ of available disk space<\/li>\n<\/ul>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Preferred<\/h3>\n<ul>\n<li>8-core processor<\/li>\n<li>16GB+ RAM<\/li>\n<li>100GB+ of available disk space<\/li>\n<\/ul>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">Installation<\/h2>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">MacOS<\/h3>\n<h4 style=\"padding: 0;\">Install DMG via direct download (recommended)<\/h4>\n<ul>\n<li>Download the latest <strong>.dmg<\/strong> package from GitHub<\/li>\n<li>Mount the DMG by double-clicking it<\/li>\n<li>Double-click on the LandoInstaller.pkg<\/li>\n<li>Go through the setup workflow<\/li>\n<li>Enter your username and password when prompted<\/li>\n<\/ul>\n<h4 style=\"padding: 0;\">Install via HomeBrew (third party)<\/h4>\n<ul>\n<li>Ensure homebrew is installed and up-to-date.<\/li>\n<li>Add the lando cask: <strong>brew install &#8211;cask lando<\/strong><\/li>\n<\/ul>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Linux<\/h3>\n<ul>\n<li>Install the\u00a0<a href=\"https:\/\/docs.docker.com\/engine\/installation\/\">Docker Community Edition<\/a>\u00a0for your Linux version. Visit\u00a0<a href=\"https:\/\/get.docker.com\/\">https:\/\/get.docker.com<\/a>\u00a0for the &#8220;quick &amp; easy install&#8221; script.<\/li>\n<li>Install\u00a0<a href=\"https:\/\/docs.docker.com\/compose\/install\/\">Docker Compose<\/a>.<\/li>\n<li>Download the latest <strong>.deb<\/strong>, <strong>.pacman,<\/strong> or <strong>.rpm<\/strong> package from\u00a0<a href=\"https:\/\/github.com\/lando\/lando\/releases\">GitHub<\/a><\/li>\n<li>Double click on the package and install via your distributions &#8220;Software Center&#8221; or equivalent.<\/li>\n<\/ul>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold;\">Windows<\/h3>\n<ul>\n<li>Make sure you are using at least Windows 10 Home or Professional version 21H2 or higher<\/li>\n<li>Download the latest Windows\u00a0<code>.exe<\/code>\u00a0installer from\u00a0<a href=\"https:\/\/github.com\/lando\/lando\/releases\">GitHub<\/a><\/li>\n<li>Double-click on <strong>lando.exe<\/strong><\/li>\n<li>Go through the setup workflow<\/li>\n<li>Approve various UAC prompts during the installation<\/li>\n<\/ul>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">Setup Drupal 9 with Lando<\/h2>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold; padding-bottom: 0;\">Download the Drupal codebase<\/h3>\n<p>It is recommended to download the Drupal core codebase using Composer because current Drupal uses composer-dependent modules and libraries. To create the project, we&#8217;ll use the official composer template for Drupal, it can be found at <a href=\"https:\/\/github.com\/drupal\/recommended-project\">https:\/\/github.com\/drupal\/recommended-project<\/a>. To create your project, you should run this command:<\/p>\n<pre><strong>composer create-project drupal\/recommended-project:^9 lando-demo<\/strong><\/pre>\n<p>Above command will download Drupal core and dependencies into a\u00a0<strong>lando-demo<\/strong>\u00a0folder.<\/p>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold; padding-bottom: 0;\">Initialise Drupal codebase with Lando<\/h3>\n<p>Now, let&#8217;s start playing with Lando and see how it&#8217;s easy to configure. Follow the given steps:<\/p>\n<ol>\n<li>Switch to project directory <strong>lando-demo<\/strong><\/li>\n<li>Run <strong>lando init<\/strong>\u00a0command and you will see below options<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57472\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando1.png\" alt=\"\" width=\"724\" height=\"195\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando1.png 724w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando1-300x81.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando1-624x168.png 624w\" sizes=\"(max-width: 724px) 100vw, 724px\" \/><\/li>\n<li>Select\u00a0<strong>current working directory\u00a0<\/strong>as codebase directory<strong>,\u00a0<\/strong>press<strong>\u00a0Enter\u00a0<\/strong>and you will see below options<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57473\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando2.png\" alt=\"\" width=\"766\" height=\"219\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando2.png 766w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando2-300x86.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando2-624x178.png 624w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><\/li>\n<li>Scroll down with the <strong>Down\u00a0<\/strong>arrow key from the keyboard, select <strong>drupal9\u00a0<\/strong>as<strong> the recipe, <\/strong>and press<strong>\u00a0Enter<\/strong>. You will see the below output.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57474\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando3.png\" alt=\"\" width=\"768\" height=\"118\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando3.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando3-300x46.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando3-624x96.png 624w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/li>\n<li>Write\u00a0<strong>web\u00a0<\/strong>in the web root, press <strong>Enter, <\/strong>and you will see the next step.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57475\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando4.png\" alt=\"\" width=\"764\" height=\"149\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando4.png 764w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando4-300x59.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando4-624x122.png 624w\" sizes=\"(max-width: 764px) 100vw, 764px\" \/><\/li>\n<li>Enter your app name (e.g. Lando Demo) and press\u00a0<strong>Enter, <\/strong>and you will see the below screen.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57476\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando5.png\" alt=\"\" width=\"850\" height=\"500\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando5.png 850w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando5-300x176.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando5-768x452.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando5-624x367.png 624w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/li>\n<\/ol>\n<p>After finishing the above steps, <strong>.lando.yml<\/strong> file will be created (as a hidden file) in the project directory with some basic details like app name, recipe, webroot etc. The <strong>.lando.yml<\/strong> file will always be there in the project root folder. This file may also contain services, tooling, database etc., information based on your project requirements.<\/p>\n<h3 style=\"font-size: 1.17em !important; font-weight: bold; padding-bottom: 0;\">Drupal Installation<\/h3>\n<p>After initializing Drupal with Lando, we will now proceed to get local development urls. Now, let&#8217;s run <strong>lando start<\/strong> command to start Lando with docker containers, appserver, database server etc. Once you hit this command, you will see the below output.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57477\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando6.png\" alt=\"\" width=\"521\" height=\"191\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando6.png 521w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando6-300x110.png 300w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/p>\n<p>To proceed further with Drupal installation, we need database name, username, password, host, etc details. To get these details, run <strong>lando info<\/strong> command, and you will get all details.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-57478\" src=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando7.png\" alt=\"\" width=\"770\" height=\"527\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando7.png 770w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando7-300x205.png 300w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando7-768x526.png 768w, \/blog\/wp-ttn-blog\/uploads\/2023\/05\/lando7-624x427.png 624w\" sizes=\"(max-width: 770px) 100vw, 770px\" \/><\/p>\n<p>Get database details from the above screen from <strong>service: database<\/strong> section and set it into <strong>settings.local.php<\/strong> or <strong>settings.php<\/strong>.\u00a0Proceed with further steps as you follow on normal Drupal installation.<\/p>\n<p>Please\u00a0<a href=\"https:\/\/docs.lando.dev\/cli\/\" target=\"_blank\" rel=\"noopener\">click here<\/a>\u00a0to get familiar with some useful Lando commands.<\/p>\n<h2 style=\"font-size: 1.5em !important; font-weight: bold;\">Conclusion<\/h2>\n<p>Lando is a very powerful tool for managing local services, and it is effortless to install and configure. If you have basic knowledge of Docker, then you can easily customize and configure your Lando setup easily. That&#8217;s it! You are now ready to use Drupal with Lando.<\/p>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>What is Lando? &#8220;Lando is a free, open-source, cross-platform, local development environment and DevOps tool built on Docker container technology. It is mainly designed to work with most major languages, frameworks, and services. Lando provides an easy way for developers of all skill levels to specify simple or complex project requirements and then quickly get [&hellip;]<\/p>\n","protected":false},"author":1587,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":81},"categories":[2348,3602],"tags":[5232],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57406"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1587"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=57406"}],"version-history":[{"count":22,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57406\/revisions"}],"predecessor-version":[{"id":57551,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/57406\/revisions\/57551"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=57406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=57406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=57406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}