I am using an ubuntu digitalocean droplet as a web application server. I have 2 active applications that require php8.0
and above but I want to deploy a third application that requires php8.1
.
I have installed php8.1 and edited my nginx configuration for each application to usephp8.1
. Ran php -v
command and the active version is still php8.0
How can I switch to php8.1
?
2
Answers
you can refer to this article: https://ostechnix.com/how-to-switch-between-multiple-php-versions-in-ubuntu/
Your default PHP 8.0:
Run installed PHP 8.1:
You can switch active version by:
Output