Pantheon Agency Tips

Tips for agencies working on Pantheon.

Contributors: David Needham


We've compiled some great tips for agencies working on Pantheon. They are loosely ordered from basic to advanced and cover a variety of topics. If you would like to see something added to this doc, please use the Contribute link at the top of this article.

Supporting Organizations

When working with a client who has ownership of their Pantheon site, either through an individual account or another organization, make sure your agency is added as a supporting organization to the site. This will add the site to your agency dashboard and also grant all users of your organization permissions to the site. This makes it easy for the client to add your agency for a project and allows you to manage permissions for your team in one place, your agency dashboard, without needing to add or remove users from sites one at a time.

Training Resources for New Team Members

Pantheon strives to maintain accurate and up-to-date documentation. Some docs worth noting, and good for new members of your team, are:

Power Users Group

The Power Users group is a great place to read about advanced Pantheon topics, post questions, and stay up to date on Pantheon developments.

Pantheon For Agencies Webinar Series

The Agency and Community team at Pantheon produced a six part training series that starts with an introduction and moves into power tools and advanced workflows.

HTTPS

Follow our Launch Essentials guide to automatically provision HTTPS for free using Let's Encrypt.

Solr

All plans except for the Basic plan can enable Solr for search indexing. For installation instructions and additional details, see Enabling Solr for WordPress, Enabling Solr with Drupal 7 or Enabling Solr on Drupal 8.

Redis

All plans except for the Basic plan can enable Redis for object caching. For installation instructions and additional details, see Installing Redis on Drupal or WordPress.

WordPress

The following tools are specifically for WordPress.

PHP Sessions

In order to use PHP Sessions with a WordPress site you will need to install the WordPress Native PHP Sessions plugin. For details, see WordPress and PHP Sessions.

WordPress Multisite

Running a WordPress Site Network requires a special configuration that is only available to contract customers. These sites can only be created by Pantheon employees. For details, see WordPress Site Networks.

Migration

The guided migration process for WordPress is baked into the Pantheon User Dashboard - simply click Migrate Existing Site and select WordPress to get started. For details, see Migrate Sites to Pantheon.

Drupal 8 and Composer

Drupal 8 is the first version of Drupal to include Composer usage within Drupal Core itself. For details, see Composer Fundamentals and Workflows.

Advanced Tools

Terminus

Terminus, the Pantheon command-line interface, has a near 1:1 parity with the Pantheon Dashboard. After installing this tool locally, login using a machine token. This allows for passwordless authentication, which is often necessary for bots, scripts and continuous integration.

You can extend Terminus and add new commands by installing or creating third-party plugins. For a complete list of supported plugins, see our Plugin Directory. Two favorites are Filer, which assists with opening Pantheon sites in many popular SFTP GUI clients, and Pancakes, which open any Pantheon site database using a SQL GUI client. These two plugins eliminate logging into the Pantheon dashboard and copying/pasting credentials into your client.

Quicksilver

Quicksilver Platform Hooks allow you to automate actions in response to activity on the Dashboard. You can hook into various workflows and execute PHP scripts before or after the workflow's been triggered. For details, see Automating and Integrating your Pantheon Workflow with Quicksilver Platform Hooks.

Pantheon Configuration File

Use the pantheon.yml file to set up platform hooks and advanced site configurations such as PHP version, nested docroot and more. For details, see The pantheon.yml Configuration File.

New Relic APM Pro

New Relic APM Pro is an advanced tool for application monitoring and troubleshooting, provided to all sites on Pantheon for free. For details, see New Relic APM Pro. The following blog posts are also a great reference:

Cron

Pantheon does not provide a way to set custom scheduling for cron jobs. For details, see Cron for Drupal and Cron for WordPress.

Advanced Workflows

Custom Upstreams

In addition to the frameworks offered by Pantheon during the site creation process, Custom Upstreams add a private installation option for all team members of an organization. A Custom Upstream is a remotely hosted repository that your agency manages, and can include shared code used on many sites, such as a starter theme or plugins/modules, in addition to the WordPress or Drupal core. When an update is pushed to the upstream it will show up in the dashboard for all sites created from that upstream. For details, see Introduction to Custom Upstreams. You can see an example WordPress Upstream workflow in this blog post.

Build Steps

Pantheon currently does not support a code build step, which includes tasks such as installing dependencies with Composer or Git submodules, using JavaScript task runners such as Grunt or gulp, etc.

If a project needs a build step the recommended method is a two repository model where you have an external Git repository hosted outside of Pantheon with an intermittent build step, then deploy the build artifact to Pantheon. Some samples are:

  • Host a Git repository on GitLab and use their continuous integration tools.
  • Host a Git repository externally and use a tool such as DeployBot to manage the build step and deployment to Pantheon
  • Host a repository on GitHub and manage the build step and deployment with a continuous integration server. An example repository with GitHub, WordPress and CircleCI can be found here.

Advanced Git Workflows

Pantheon provides a git repository for every site. If you wish to use GitHub's pull requests or other external tooling, you can automate pushes from outside systems to Pantheon. The recommended method is a two repository model. Details can be found in the Build Steps section above.