How to Upgrade PHP Version from 7.4 to 8 in Ubuntu?
Here, i will show you how to works update php 7.4 to 8 ubuntu. you will learn upgrade php 7.4 to 8 ubuntu. it's simple example of how to upgrade php 7.4 to 8 ubuntu. this example will help you ubuntu update php 7.4 to 8. Follow bellow tutorial step of ubuntu 20 upgrade php 7.4 to 8.
just follow bellow command to update php 7.4 to php 8 in ubuntu os.
Add PPA for PHP 8.0
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Install PHP 8
sudo apt install php8.0
Install PHP 8 Packages
sudo apt install php8.0-common php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-intl -y
PHP 8 Enable
sudo a2dismod php7.4
sudo a2enmod php8.0
sudo service apache2 restart
now you can check php version:
If it's still show old php version then you can run bellow command and choose new php version from there list. so run bellow command:
sudo update-alternatives --config php
Then it will works
i hope it can help you....
We are Recommending you
- PHP Explode Every Character into Array Example
- How to Export Mysql Database using Command Line in Ubuntu?
- How to Import Database in Mysql using Command Line in Ubuntu?
- Angular 12 Httpclient Service Request Example
- How to Install Yarn npm in Ubuntu?
- How to Upgrade PHP Version from 7.3 to 7.4 in Ubuntu?
- How to Upgrade PHP Version from 7.2 to 7.3 in Ubuntu?
- How to Enable Apache mod_rewrite Module in Ubuntu?
- Laravel 8 REST API with Passport Authentication Tutorial
- How to Downgrade php 7.4 to 7.3 Ubuntu?
- How to enable rewrite mode for apache in ubuntu?