Install and Configure DDEV for Drupal
Install and configure DDEV for Drupal local development.
Discuss in our Forum Discuss in SlackThis section provides information on how to use DDEV for local development with Drupal sites on Pantheon.
Before You Begin
Be sure that you have:
An existing Drupal site on Pantheon, or create a site.
Reviewed the Get started with DDEV guide.
Verified that you meet DDEV's system requirements.
Installed Drush as part of your Drupal project. You can add this via your CLI:
$ ddev composer require drush/drush
Download and Install DDEV
Download the appropriate DDEV release for your Operating System.
Open the installer package and allow it to prepare.
Follow the system prompts to install DDEV.
Use DDEV with Pantheon
Navigate to your Pantheon Dashboard and generate a machine token for use with your DDEV site.
Open your global DDEV configuration file at
~/.ddev/global_config.yaml
and add the API token to theweb_environment
section:web_environment: - TERMINUS_MACHINE_TOKEN=insertyourtoken
Copy the
example.pantheon.yaml
provider file to thepantheon.yaml
.Update the project name and environment variable. In the example below, the project name is
de8
and the targeted environment islive
. This example updates the local DDEV environment with database and content file backups from the Pantheon Live environment.environment_variables: project: de8.live
Run
ddev pull pantheon
to update your local database and content files. You can add the--skip-files
parameter if you don't want to sync the content files to your local. Remember to specify the site and Pantheon environment you want to target when running theddev pull
command, and create a new backup when you need to refresh what you pull.