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.
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:
- Pantheon platform consideration
- Advanced caching
- Non-standard file locations
- Modules and Plugins with Known Issues
- Pantheon FAQs
- Pricing comparison
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.
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.
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.
The following tools are specifically for WordPress.
Running a WordPress Site Network requires a special configuration that is only available on Elite plans. These sites can only be created by Pantheon employees. For details, see WordPress Site Networks.
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.
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 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
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:
- Getting Started with New Relic APM Pro
- New Relic & Drupal: Find Your Site's Slow Spots
- Troubleshooting WordPress Performance with New Relic
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.
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.