How to upgrade php7 to 7.1 or 7.2 Caddy and Nextcloud


(Jessdaddy) #1

I installed Nextcloud with Caddy by following the instructions found here:

The setup works great. But, I would like to upgrade php from 7.0 to 7.1 or 7.2.

I have tried a few of the upgrade tutorials on the web, but none seem to work for me. How do you guys suggest I go about upgrading PHP from 7.0 to 7.1 or 7.2 with Caddy and Nextcloud? Thanks in advance.


(Matthew Fay) #2

Caddy’s pretty forgiving - there aren’t any special considerations on its part for upgrading PHP.

The rest is up to your system’s package manager, I’m afraid.


(Jessdaddy) #3

Thanks for the reply. As far as Caddy is concerned, what do I need to change? Can I just change the php-fpm path in Caddyfile and be set? Or, is there something else I need to change? Thank you.


(Matthew Fay) #4

Depending on how you’ve set up your fastcgi directive, you won’t need to change anything.

Once you upgrade PHP, the newer version will be listening (at either the standard PHP-FPM port 9000, or the unix socket on disk). You’d essentially be swapping out the older version for the newer version in place.

You might have needed to change something if you’d used Docker (again, depending on the method you used to reference the PHP-FPM listener upstream), but the guide has you install all these programs directly on the host, so it’s just a matter of running the upgrade via your package manager.


(Jessdaddy) #5

Thank you for the reply. I was able to upgrade to PHP7.1 finally. Thanks again for your input. Much appreciated.