How to upgrade the PHP version in Pantheon

First, check out this article: https://pantheon.io/docs/php-versions/

Steps: 

1.) Look for the pantheon.yml file in the /code/ directory. 

  • If it's not there, create one. 
  • If it is there, edit it. 
2.) Add the following code: 

api_version: 1
php_version: 7.0
3.) So it looks like this: (see image below)

So the pantheon.yml file will look exactly like this: 

4.) Upload the file via SFTP to Pantheon in your /code/ directory

5.) Commit the code and leave a good commit message, like this: 

6.) You're done!

Still need help? Contact Us Contact Us