DDEV provides configurable integration with the Pantheon Website Management Platform, which allows Pantheon users to quickly download and provision a project from Pantheon in a local DDEV-managed environment.
DDEV’s Pantheon integration pulls an existing backup from an existing Pantheon site/environment into your local system. That means you must already have a Pantheon site with a backup in order to use it.
If you have DDEV installed, and have an active Pantheon account with an active site, you can follow this guide to spin up a Pantheon project locally.
Get your Pantheon machine token: a. Log in to your Pantheon Dashboard and Generate a Machine Token for DDEV to use. b. Add the API token to the
web_environmentsection in your global DDEV configuration at
Choose a Pantheon site and environment you want to use with DDEV. You can usually use the site name, but in some environments you may need the site ID, which is the long third component of your site dashboard URL. So if the site dashboard is at
https://dashboard.pantheon.io/sites/009a2cda-2c22-4eee-8f9d-96f017321555#dev/, the site ID is
On the Pantheon dashboard for the site, make sure that at least one backup has been created. (When you need to refresh what you pull, create a new backup.)
ddev push pantheonmake sure your public SSH key is configured in Pantheon under Account → SSH Keys.
Check out the project codebase from Pantheon. Enable the “Git Connection Mode” and use
git cloneto check out the code locally.
Configure the local checkout for DDEV using
If using Drupal 8+, verify that Drush is installed in your project with
ddev composer require drush/drush. If using Drupal 6 or 7, Drush 8 is already provided in the web container’s
/usr/local/bin/drush, so you can skip this step.
In your project’s
pantheon.yaml(This refers to your project
.ddevfolder and not the global
.ddevfolder). Edit the
projectenvironment variable under
environment_variables. It will be in the format
<projectname>.<environment>, for example
yourprojectname.devor (in cases of ambiguity)
<project_uuid>.<environment>, for example
If using Colima, may need to set an explicit nameserver in
184.108.40.206. If this configuration is changed, may also need to restart Colima.
ddev pull pantheon. DDEV will download the Pantheon database and files and bring them into the local DDEV environment. You should now be able to access the project locally.
ddev push pantheonto push local files and database to Pantheon. The
ddev pushcommand can potentially damage your production site, so we don’t recommend using it.