How do I link Drush to my Drupal site on Pantheon?

by Shawn   Last Updated April 15, 2019 11:07 AM - source

A friend of mine got me into Drupal and did the initial setup for me. At first, I was using localhost to play with Drupal and Drush to download and enable modules.

Now I have my own Pantheon hosting site that lets me install Drupal on their side, but how do I link my Drush command prompt to my online site? Before on localhost, it was just a matter of changing directories, but how do I connect it for a site online?

Edit: This is for Drupal 7.

Tags : 7 drush pantheon


Answers 1


Start off by installing Terminus. Terminus now supports machine tokens; once you set these, up you can authenticate automatically without a password simply by running terminus auth login <email address>.

Once you are authenticated with Terminus, terminus sites aliases will download Drush aliases for all of your Pantheon sites. Since this list can change over time (e.g. when you add or delete sites on Pantheon), you will want to periodically re-run this command. You might even want to have Terminus log in and update your aliases in your shell startup script (e.g. .bashrc).

Once your aliases are up-to-date, you can use a remote site via:

drush @pantheon.mysitename.dev status 
greg_1_anderson
greg_1_anderson
January 31, 2016 22:14 PM

Related Questions


How to apply patches on Pantheon?

Updated July 01, 2017 04:07 AM




Drupal 8 - SPA settings (Pantheon)

Updated July 06, 2017 17:07 PM