ubuntu update php 7.4 to 8
sudo apt-get purge php7.*
# recommended
sudo apt-get autoclean
sudo apt-get autoremove
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
# end recommended
sudo apt-get install php8.0
ubuntu update php 7.4 to 8
sudo apt-get purge php7.*
# recommended
sudo apt-get autoclean
sudo apt-get autoremove
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
# end recommended
sudo apt-get install php8.0
upgrade php 8 ubuntu 20.04
# php -v (default PHP version)
# From PHP 8.0 to PHP 7.4:
sudo a2dismod php8.0
sudo a2enmod php7.4
sudo update-alternatives --set php /usr/bin/php7.4
sudo service apache2 restart
# From PHP 7.4 to PHP 8.0:
sudo a2dismod php7.4
sudo a2enmod php8.0
sudo update-alternatives --set php /usr/bin/php8.0
sudo service apache2 restart
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us