Installing a Pantheon Site Locally


When building your Drupal 8 site locally site from a Pantheon instance, there are a few things that need to be done. As I’ve just gone through this process I’ve put together this quick 5 minute description of how to do it, and resolve the error that you may run into.

If you haven’t used Pantheon Hosting yet, give it a try. I highly recommend it.

  • Clone the codebase (ideally with Git, if not download the codebase over FTP)
  • Backup and download the database
  • Install the MySQL datbase locally
  • In the codebase copy example.settings.local.php from /sites into sites/default
  • Rename example.settings.local.php to setting.local.php
  • Enter the details & credentials for your local site:// Local development configuration.if (!defined(‘PANTHEON_ENVIRONMENT’)) { // Database. $databases[‘default’][‘default’] = array( ‘database’ => ‘your-database-name’, ‘username’ => ‘your-database-username’, ‘password’ => ‘your-database-password’, ‘host’ => ‘localhost’, ‘driver’ => ‘mysql’, ‘port’ => 3306, ‘prefix’ => ”, );}
  • Now you will also need to specify a hash_salt otherwise Drupal will throw a tantrum / error message
  • In settings.local.php add the following:$settings[‘hash_salt’] = ‘RandomString’;

Now you can hit the URL of your local site and it should load without an error, now you can write and push code to your hearts content.

About the author


I am London based Ecommerce Business Analyst & Technical Lead. Always keen to chat.