Clone a Pantheon site (WordPress, Drupal 7, or Drupal 8) to your local, including automatic setup of the database and (if desired) files.
- Your site's machine name on Pantheon. (You can find the machine name of your site by visiting the site's Pantheon dashboard and clicking the tab for the dev environment. Then click the "Visit Development Site" button. The site's machine name is the bit between "dev-" and ".pantheonsite.io" in the url.)
- Which environment (live, dev, a multidev?) you'd like to clone the database from
- The username and password for your local mysql
- Clone this project to your local. (Either put it in your Sites directory (or Projects or whatever you call it) or add an alias to the script in your bash profile to make it easier to call.)
- You can either edit the script for each site you want to download, filling in the variables at the top, or just run it and input the variables in the interactive wizard.
- The automatic detection of which kind of site (WordPress, Drupal 7, or Drupal 8) is based on Pantheon upstreams, and includes some custom upstreams. You may need to edit the script to include any of your own custom upstreams.
When you clone a site with the clone script, a robo script will installed at the root of your site. From then on you can just navigate to your site root in the terminal and enter robo pull
to replace your local database with a fresh copy of the database from Pantheon, and robo pullfiles
to pull copies of the uploads :)