Netlify - PHP Version

I wrote this article on Tuesday, December 17, 2019

Netlify is a great service - it allows you to deploy your website from GIT, built and then served via the companies CDN channels. I use the free tier to serve this website.

I've been playing around the last few days to build a new static site generator, and I wanted to build it using Laravel's Blade and Collection systems. That means, as I use Laravel 6.0 - I need to use at least PHP 7.2, which isn't available using Netlifys default image configuration.

Luckily, its easy to change the version of PHP netlify loads in. Navigate to Enviroment by following these navigation links:

  • Get a site ready for deployment
  • Settings
  • Build & Deploy
  • Enviroment

Once you are here, create a new Environment variable called PHP_VERSION and set it to 7.2

Done - deploy and benefit from using a latest version of PHP in netlify 👍

Created with Jigsaw, hosted on Netlify.