Install PHP 7.3 on Ubuntu 18.04 with Apache

Linux is a very popular environment for [PHP + Apache] server configuration. Ubuntu is a one of popular operating system in Linux family. In this post, i am going to describe the steps for installing PHP 7.3 with Apache2.

Before we start, ensure that your system packages are upto-date. Run the  below to commands to perform system package update and upgrade.

This will update the package index and update the installed packages to the latest version.

PHP 7.3 is a not available on Ubuntu 18.04 default repositories. Add the ondrej/php which has PHP 7.3 package and other required PHP extensions.

If you encounter the error, sudo: add-apt-repository: command not found, install the following package to fix it.

Now, re-synchronize your system packages to the latest versions.

Install PHP 7.3 for Apache

Execute the following command to install PHP 7.3

After the installation has completed, confirm that PHP 7.3 has installed correctly.

Now, install some commonly used php-extensions with the following command.

Now you have successfuly installed PHP 7.3 on Ubuntu.

Leave a Reply