/* This workflow assumes you have installed Drush and have downloaded Pantheon site aliases with terminus aliases
*/
- Set bash variable:
SITE=<sitename>
- Clone your LIVE environment to DEV in Pantheon
terminus env:clone-content --updatedb -- $SITE.live dev
(Optional, but recommended) - Commit all LOCAL changes in Git.
- Export configs on LOCAL:
drush config:export
- Commit changes on LOCAL:
git commit -am "export local configs to code"
- Pull remote changes from LIVE to LOCAL:
drush config:pull @$SITE.live @self:../config/
- Resolve any conflicts and then commit on LOCAL:
git commit -am "resolve config code conflicts"
- Push changes up to remote DEV:
git push origin
- Import configs from pushed code into remote DEV database:
terminus drush $SITE.dev -- config:import
- Push changes from DEV to TEST:
terminus env:deploy --updatedb --sync-content -- $SITE.test && terminus env:cc $SITE.test
- Import configs from pushed code into remote TEST database:
terminus drush $SITE.test -- config:import
- Push changes from TEST to LIVE
terminus env:deploy --updatedb -- $SITE.live && terminus env:cc $SITE.live
- Import configs from pushed code into remote LIVE database:
terminus drush $SITE.live -- config:import
- Rebuild the cache on remote LIVE site:
terminus drush $SITE.live -- cr
- Unset bash variable
unset SITE
Notes: If you did it right, you shouldn't mess anything up on the remote if you do it this way (assuming someone doesn't change anything on you. Ideally, you should put the site into Maintenance Mode before doing this, just to avoid any surprises).