This site requires JavaScript to be enabled
An updated version of this article is available

Drupal on Pantheon (updating PHP and other system settings)

1161 views

11.0 - Last modified on 10-27-2026 Revised by David Baniszewski

10.0 - Last modified on 10-27-2026 Revised by David Baniszewski

9.0 - Last modified on 10-27-2026 Revised by David Baniszewski

8.0 - Last modified on 10-15-2026 Revised by Shelby Shone

7.0 - Last modified on 10-07-2025 Revised by Sussan Dehghan-Kavoosi

6.0 - Last modified on 06-02-2025 Revised by Shelby Shone

5.0 - Last modified on 05-29-2025 Revised by David Baniszewski

4.0 - Last modified on 01-08-2025 Revised by Sussan Dehghan-Kavoosi

3.0 - Last modified on 01-03-2024 Revised by Shelby Shone

2.0 - Last modified on 04-27-2023 Revised by David Baniszewski

1.0 - Created on 12-14-2022 Authored by David Baniszewski

It is possible to update the site configuration of your Pantheon Drupal environment to adjust server side settings such as the version of PHP your site is running on, as well as other settings such as the version of MariaDB. 

In this article we will cover how to change the PHP version, but the procedure is the same for any value applicable to the pantheon.yml file.

Before you begin

This procedure requires a local copy of your site's Git repository. If you have not previously downloaded your site's code, or need help setting up Git, follow the setup and Site code checkout instructions in Drupal on Pantheon (Build a site with Composer).

If you already have a local copy of the site's repository, open a terminal, change to the site's repository directory, and retrieve the latest changes:

git status

git pull

Finding pantheon.yml

Pantheon system settings for the site are stored in a file named pantheon.yml. The file is located in the root of the site's repository.

“Root” means the top level of the site's code directory, rather than a directory inside it.

Open the site's repository directory and locate:

pantheon.yml

Top

Changing Settings

Once you find or create the pantheon.yml file, edit it with a text editor.  For this article we will be editing the value of PHP, so search your file for PHP. If your file has a PHP value you can edit it, if it does not you can add one. For this example we will change the PHP setting to use PHP version 8.3 by editing or adding the following value on its own line:

php_version: 8.3

Once you have added or edited the value, save the file.

Top

Commit and push

After editing the pantheon.yml file, you are now ready to commit your changes to the site repo and push them back to the Pantheon server to be build. From your git repo on the command line, or from your git GUI, you should see that the pantheon.yml file has changed.

Once you push your changes, Pantheon will run updates on their servers, and the changes will be deployed to the dev version of your site for review. Once you have tested the changes on the dev site, you will then need to push the code changes up to test and then again to the live site. Instructions for this are included in the Drupal on Pantheon (Build a site with Composer) article.

Top

Other values

It is possible to adjust other values, such as the version of MariaDB database that your drupal site is using, by editing the pantheon.yml file as above. For example, to edit the version of Maria, you would find and edit or add the lines:

database: version: 10.6

For the full list of values or to view the Pantheon documentation, please review the resources below.

Top

Resources

Top