Did you know Pantheon is one of the largest hosting providers for Drupal websites the world over? As of 2021, they host over 300,000 Drupal sites*! Launched in 2010, Pantheon offered Drupal-specific hosting environment that was optimized for Drupal websites. As a website management platform, they offer an integrated set of services and tools allowing teams to build, launch, and manage websites.
Drupal and Pantheon are a great match. Find out more about this as you read on AND also learn how to install Drupal on Pantheon from scratch. There’s more! You will also find out about setting up Pantheon locally, interesting commands for transfers, command line interactions and more. Dive in!
Why do Drupal developers Love Pantheon
Drupal developers prefer Pantheon because it is easy to use and set up, but more importantly because it offers an environment optimized for Drupal sites. Even the security features are specifically tailored to the needs of Drupal websites. A few more reasons why Pantheon is a great choice for developers:
- Automated backups, security monitoring and Automated updates.
- Website Performance Monitoring using New Relic
- Git and Version control on all domains
- Redis and Varnish cache to speed-up page delivery by caching
- Multi-dev environment to easily keep track of code changes
- Highly responsive Pantheon support team to help work through server related issues and technical issues.
Setting Up Drupal on Pantheon
It really is a very straightforward process. Follow the steps below to setup Drupal 9 on Pantheon
1. Visit https://pantheon.io/ to register to Pantheon using your email address
2. Click on Get Started
3. Once logged in, you will be land on the workspace page
4. Click on Create New Site as shown below.
5. Choose what kind of site you want to create. Let’s go with Drupal 9. Read this article to find out why.
6. Provide your Pantheon site details like the Name of the Site and continue.
7. This process will take a few moments. Once it's done, click on “Visit Pantheon Site Dashboard.”
8. Visit your website, by clicking “Visit Development Site”.
Installing and Customizing your Drupal 9 site
Now that you have set up Drupal on Pantheon, let’s install and customize your Drupal site. Upon visiting your website for the first time, you will be directed to the Drupal installation page.
- Choose the language of your choice. I’ll go with English.
- Choose the Standard Installation profile.
- Configure your site with information like Name of the site, Site Email Address, Username and password.
- Hit Save.
And your Drupal 9 site is ready!
Setting Up Pantheon Locally
Using the following commands to set up Pantheon on your local system:
Create a new directory “pantheon” and enter it
mkdir pantheon && cd pantheon
Go through interactive prompts to get your site from Pantheon and create a .lando.yml file
Start up the application
Import your database and files
Transfering Files with the Get and Put Command
The Get and Put commands help create a file transfer request in SFTP.
- First, login to the server using the SFTP command provided in Connection Info
- If you’re logging in for the first time, you need to generate machine tokens to uniquely identify your machine and securely authenticate yourself. Find out how to generate machine token here.
Use the GET command to transfer files from a remote server to your local system
get -r <folder-name>
Use the PUT command to transfer files from your local system to the remote server
put -r <folder-name>
Terminus Command Line Tool
Terminus is a command-line interface (CLI) provided by Pantheon, which allows you to manage Drupal sites using a set of powerful tools. It is built on top of the Drush command-line tool, and provides additional functionality that is specific to Pantheon.
Developers can manage their Drupal sites from the command line, without the need to use the Pantheon dashboard.
To install Terminus, go here: https://docs.pantheon.io/terminus/install
Format of the terminus command: terminus command:subcommand <site>.<env>
The terminus command structure includes <site>.<env> in order to determine the target site and environment to execute the command.
For example, running the clear cache command for the Dev environment of a site labeled "techxspecbee"
To run the configuration import drush cim command for the Live environment of a site labeled "techxspecbee"
We can get a list of all available commands using
* References: https://www.drupal.org/pantheon
Drupal provides a robust content management system that is flexible and highly customizable, while Pantheon provides a secure and scalable hosting platform that is optimized for Drupal sites. The combination of Drupal and Pantheon allows developers to build websites quickly and easily, while also ensuring that they are secure and performant. With features like automatic backups, continuous integration, and easy site management, Pantheon is a great platform for Drupal developers looking to build websites that can scale with their projects. Are you looking for Drupal experts to build and manage your Pantheon-hosted site? We’d love to help! Contact us today and let’s get started.