DEV Community

Manoj Chakraborty
Manoj Chakraborty

Posted on • Updated on

Upgrade Your PHP

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

PHP 8 Enable

sudo a2dismod php7.4
sudo a2enmod php8.0

sudo service apache2 restart
Enter fullscreen mode Exit fullscreen mode

Now you can check php version:

php -v

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

Then it will works

i hope it can help you....

also check this for game lover Naruto Senki Mod APK Unlocked All Character

Top comments (1)

Collapse
 
leslieeeee profile image
Leslie

If you are a macOS user, ServBay.dev is worth to try. You don't need to spend some time or couple of days to setup anything. Just download it and you can use it immediately. You can run multiple PHP versions simultaneously and switch between them effortlessly.
Honestly, this tool has greatly simplified my PHP development and is definitely worth trying!