Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save freekmurze/09e7c062e52617fc2dfca397895fb537 to your computer and use it in GitHub Desktop.
Save freekmurze/09e7c062e52617fc2dfca397895fb537 to your computer and use it in GitHub Desktop.
Upgrade PHP 5 to 7 on a Forge provisioned server

sudo add-apt-repository ppa:ondrej/php

sudo apt-get install php7.0

sudo apt-get install php7.0-gd

sudo apt-get install php7.0-mysql

sudo apt-get install php-memcached

sudo apt-get install php7.0-mcrypt

sudo apt-get install php-curl

sudo apt-get install php-imagick

sudo service php7.0-fpm restart

in nginx config:

  • remove newrelic new relic
  • replace sock by /var/run/php/php7.0-fpm.sock

sudo chmod 0666 /var/run/php/php7.0-fpm.sock

/etc/php/7.0/fpm/pool.d/www.conf --> user and group should be "forge"

reboot nginx

profit!

more info: https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-ubuntu-14-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment