Skip to content

Starting a Local Drupal 10 Project with DDEV

Posted on:March 5, 2024 at 06:30 PM

Starting a Local Drupal 10 Project with DDEV

Prerequisites

Before you begin, ensure that the following requirements are installed on your system:

  1. Docker: DDEV relies on Docker to create and manage containers. Make sure Docker is installed on your machine. Docker installation

  2. DDEV: Install DDEV by following the specific instructions for your operating system. You can find the official documentation at https://ddev.readthedocs.io/.

Step 1: Create a directory for your project and configure DDEV

Start by creating a new directory for your project. Then, run the following command to configure DDEV:

mkdir project-name
cd project-name
ddev config --project-type drupal10 --create-docroot --docroot web

Step 2: Start DDEV

Start the containers by running:

ddev start

Step 3: Create a New Drupal 10 Project

Open your terminal and navigate to the directory where you want to create your new project. Then, run the following command to create a Drupal 10 project using Composer:

ddev composer create drupal/recommended-project -y

This command will download the necessary files and set up the basic project structure.

Step 4: Install Drupal 10

With the development environment up and running, install Drupal 10 by executing the following commands:

ddev composer require --dev drush/drush
ddev drush site:install --account-name=admin --account-pass=admin -y

This will install Drupal and configure the database and other essential components.

Step 5: Launch the Development Site

Finally, launch your new Drupal site and log in.

ddev launch

Step 6: Access the Development Site

Upon completing the above steps, your Drupal 10 project will be available locally. Access the development site in your browser by visiting the URL provided by DDEV, typically http://project-name.ddev.site.

That’s it! You now have a locally configured Drupal 10 development environment ready to be customized according to your needs. Remember that DDEV simplifies environment management and provides additional tools to streamline Drupal project development.