Friday, February 26, 2021

How to upgrade php version from 7.0 to php 7.4 in Ubuntu 18.04.

After bouncing around between a lot of tutorials, I finally got this to work.

 


Here are the commands I needed:



sudo apt-get update


sudo apt -y install software-properties-common


sudo add-apt-repository ppa:ondrej/php


sudo apt-get update


sudo apt-get install php7.4


sudo apt-get install php7.4-mysql


php -v (check to make sure PHP 7.4 is installed)


sudo apt install php7.4-fpm php7.4-common php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-xml php7.4-mysql php7.4-cli php7.4-zip php7.4-curl


sudo a2dismod php7.0


sudo a2enmod php7.4
 

sudo service apache2 restart

 

 

No comments:

Post a Comment

If you have any problem please let me know.