How to upgrade PHP to 7.3 on ubuntu?

Introduction

The following has been tested on a Cloud9 server with the following version:

Script

sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.3 php-pear php7.3-curl php7.3-dev php7.3-gd php7.3-mbstring php7.3-zip php7.3-mysql php7.3-xml
sudo apt-get install libapache2-mod-php7.3 -y

sudo a2dismod php7.2
sudo a2enmod php7.3
sudo service apache2 restart

See also


Last update : 10/12/2021