Installing Drupal CMS (or Drupal Starshot) using DDEV
DDEV is an Open Source development environment that makes it easy to setup Drupal on your computer. It handles all the complex configuration by providing pre-configured Docker containers for your web server, database, and other services.
On macOS, you can install DDEV using Homebrew:
$ brew install ddev
Next, clone the Drupal CMS Git repository:
$ git clone https://git.drupalcode.org/project/drupal_cms.git
This command fetches the latest version of Drupal CMS from the official repository and saves it in the drupal_cms
directory.
Next, configure DDEV for your Drupal project:
$ cd drupal_cms
$ ddev config --docroot=web --project-type=drupal
The --docroot=web
parameter tells DDEV where your Drupal files will live, while --project-type=drupal
ensures DDEV understands the project type.
Next, let's start our engines:
$ ddev start
The first time you start DDEV, it will setup Docker containers for the web server and database. It will also use Composer to download the necessary Drupal files and dependencies.
By now, DDEV has fully set up your development environment, including the web server, database, and all of Drupal's code files. The final step is configuring Drupal itself. This include things like your site name, database configuration, etc. You can do this in one of two ways:
Option 1: Configure Drupal via the command line
$ ddev drush site:install
Option 2: Configure Drupal via the web installer
Alternatively, you can use the new web-based installer, which includes support for Recipes. To access the web installer, visit the DDEV URL displayed in your terminal after setup. If you're unsure of the URL, you can retrieve it by running:
$ ddev describe
After everything is installed and configured, you can access your new Drupal CMS site and set up your username and password:
$ ddev drush uli
This generates a one-time login link and opens it in your browser, allowing you to set up your username and password.