In this video, Josh Miller shows you how to install Drupal Commerce 2 using a local development tool called Lando. Further instructions are included below the video.
- Commerce Kickstart download: 0:51
- “composer install” command: 8:00
- “lando init” command: 12:56
- “lando start” command: 15:06
- “Drupal install” screen: 17:04
- “lando stop” command: 21:18
Code generated during this video:
Installing Drupal Commerce 2 locally using Commerce Kickstart, Composer, and Lando
Getting Drupal up and running on your computer is an important first step as an evaluator. Good news is that there’s a lot of tech that makes this easier than ever before. We’re going to walk you through how to install Commerce 2 using the Kickstart resource, Composer, and Lando.
- Download and install Composer
- Download and install Lando
- Next go to Commerce Kickstart to create and download your customized composer.json file
- Run ‘composer install’
- Run ‘lando init’
- Run ‘lando start’
- Visit your local URL and install Drupal
- Start building!
What is Drupal Commerce
Drupal Commerce is an ecommerce focused subset of tools and community based on the open source content management system called Drupal. Drupal Commerce gives you the ability to sell just about anything to anyone using a myriad of open source technologies and leveraging hundreds of Drupal modules built to make that thing you need do that thing you want.
We use Commerce Kickstart to get things started.
What is Composer
Composer is the PHP dependency manager that can not only build and bring in Drupal, Drupal Commerce, and Symfony, but is the technology behind the newest Drupal Commerce Kickstart distribution. We leverage the composer.json file that commercekickstart.com gives us to bring in all of the Drupal code necessary to run a Drupal Commerce website.
To get started, we run “composer install” and that command brings in all the requirements for our project.
What is Docker
Docker is a virtualization software that brings together App services like Apache, Nginx, MySQL, Solr, Memcache, and many other technologies so that it can run on your own computer. This installation video uses a tool that runs on top of Docker in an abstract, and frankly easier, way.
If you want to learn more about Docker and the many different types of tools that run on top of it, we recommend John Kennedy’s 2018 Drupalcon presentation about Docker.
Another great resource that compares using Docker tools is Michael Anello’s take on the various technologies.
What is Lando
Lando is a thin abstraction layer of tools on top of Docker that makes creating an environment as easy as “lando init” followed by “lando start.” Lando keeps the often confusing devops work of creating a local virtual environment to a few very well documented variable settings that it turns into full docker-compose scripts that Docker, in turn, uses to create a local environment where everything just works together. We’re very excited to see how Lando and Drupal Commerce start to work together.