logo

The next-generation blog, news, and article for you to start sharing your stories today!

Change PHP Version On Ubuntu Using Terminal

 

Install PHP Version

Step 1.

sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https

Step 2

LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php

Step 3

sudo apt update

Step 4

sudo apt install php8.0
sudo apt install php8.0-mysql php8.0-mbstring php8.0-xml php8.0-curl php8.0-gd

Step 5 (Switch the version)

sudo update-alternatives --config php

After this command you have to choose desiger version of the php.

avatar

Vikram Parihar

An editor at Keyscript

Vikram Parihar is an senior software engineer. He is working since 2013 in web development technologies. He works in NodeJS, Angular, Vue, PHP, Laravel, Express JS and various popular technologies.