Pantheon Workflow Cheat Sheet
Quick reference for day-to-day Pantheon development

Terminus — Multidev
# Create a Multidev from Live (max 11 chars in name)
terminus multidev:create your-site.live my-branch
# List all Multidev environments
terminus multidev:list your-site
# Delete a Multidev when done
terminus multidev:delete your-site.my-branch
# Clone DB + files from Live into a Multidev
terminus env:clone-content your-site.live my-branch
Terminus — Connection & Mode
# Get Git URL (always use .dev for the repo URL)
terminus connection:info your-site.dev --field=git_url
# Set environment to Git mode (required before pushing)
terminus connection:set your-site.my-branch git
# Set environment to SFTP mode
terminus connection:set your-site.my-branch sftp
Terminus — Drush
# Run any Drush command against an environment
terminus drush your-site.my-branch -- cr
terminus drush your-site.my-branch -- uli
terminus drush your-site.my-branch -- updb
terminus drush your-site.my-branch -- cex
# The -- separator is required
Terminus — Secrets
# List all secrets and their scopes
terminus secret:site:list your-site
# Set a secret
terminus secret:site:set your-site secret-name "value"
Terminus — Backups
# Create a backup of an environment
terminus backup:create your-site.live --element=db
# Get download URL for a backup
terminus backup:get your-site.live --element=db
# Download directly
terminus backup:get your-site.live --element=db --to=./backup.sql.gz
Git — Remotes
# View all remotes
git remote -v
# Add Pantheon as a remote
git remote add pantheon $(terminus connection:info your-site.dev --field=git_url)
# Add GitHub mirror as a remote
git remote add github [email protected]:your-org/your-repo.git
# Configure origin to push to both simultaneously
git remote set-url --add --push origin [email protected]:your-org/your-repo.git
Git — Branch Workflow
# Create and switch to a fix branch
git checkout -b my-branch
# Switch to master (Pantheon's default branch)
git checkout master
# Merge fix branch into master
git merge my-branch
# Delete local branch after merging
git branch -d my-branch
Git — Pushing
# Push fix branch to Pantheon Multidev
git push pantheon my-branch
# Push master to Pantheon Dev
git push origin master
# Push to GitHub mirror (master → main)
git push github master:main
# Push to both (if configured with --add --push)
git push origin master
DDEV
# Pull DB + files from configured Pantheon environment
ddev pull pantheon
# Start DDEV
ddev start
# Clear Drupal cache
ddev drush cr
# Import a database backup
ddev import-db --src=backup.sql.gz
# Get a one-time login link (local)
ddev drush uli
Sync Files from Pantheon to Local
# rsync files from any environment to local
terminus rsync your-site.live:files/ web/sites/default/files/
Promotion Flow
Multidev (test fix)
↓ git push pantheon my-branch
↓ verify at multidev URL
Master (merge + push)
↓ git merge my-branch
↓ git push origin master
↓ git push github master:main
Pantheon Dashboard
↓ Dev → Test → Live
Notes
- Pantheon uses
master(notmain) as its default branch - Multidev names are capped at 11 characters
- Always use
terminus connection:info your-site.devfor the Git URL — not the Multidev environment name ddev pull pantheonpulls from your configured environment, not automatically from your current branch- Email rerouting: use
!== 'live'pattern, never hardcode environment names