Level 63
You can install multiple PHP versions and then work with the one you need.
Hello, I have php v8.1.15 and I am trying to downgrade to php 8.0, and after doing successfully
sudo add-apt-repository ppa:ondrej/php
sudo apt install php8.0
the php version seems to be still 8.1.15
You have to switch the version
Remember to check if php8 necessary packages is already installed:
sudo apt-get install php8.0 php8.0-common php8.0-cli php8.0-fpm php8.0-mysql php8.0-curl php8.0-gd php8.0-bcmath php8.0-mbstring php8.0-zip
And to switch the version you can try the following commands:
sudo apt-get remove php8.1
sudo update-alternatives --set php /usr/bin/php8.0
sudo service apache2 restart
Please or to participate in this conversation.