How to upgrade php7 to 7.1 or 7.2 Caddy and Nextcloud

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.

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.

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.

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.

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.