Been waiting for PHP7 to come out and be available in usual Ubuntu repos but successfully ignored my ability to Google for that, xe. Finally, picked one evening and followed several how-to’s in order to set up as properly as possible php-fpm + nginx. Shortly after PHP7.1 came out and I simply could not be bothered to figure out an upgrade.
Steps to upgrade
Not sure if it is optional
Grep current modules
Will produce something like this:
Let’s grab the first column:
Replace PHP7.0 with PHP7.1
And what do we have?
When replacing PHP7.0 with 7.1 you will lose Xdebug. Simply remove it and freshly install again. Even if it is the same version.
My additional php-fpm and nginx amendments
Since you have php installed and some sort of server (unless you purely use php built-in server), you have some amendments to do.
- php-fpm pools in
- I consider you moved all the confs from 7.0
listen = /var/run/php/php7.1-fpm-[your-virtual-host-name].sock
- nginx sites-available in
- restart and enjoy:
sudo service php7.1-fpm stop && service php7.1-fpm start
sudo service nginx stop && service nginx start
I believe that is all I had to change if my memory serves good.