Install or upgrade php 7.2 to 7.3 ubuntu command

- Posted in Linux by

Install PHP 7.3

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.3

Install PHP 7.3 Packages

sudo apt install php7.3-common php7.3-cli php7.3-bcmath php7.3-bz2 php7.3-curl php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-readline php7.3-xml php7.3-zip php7.3-fpm

PHP 7.3 Enable

sudo a2dismod php7.2

sudo a2enmod php7.3



sudo service apache2 restart

Now you can check by following command:

php -v