Updating to PHP 7.3

rbjordan3 Tech ,
0
PHP Logo - Upgrading to PHP 7.3

A new version of PHP is going to be released on 11/28/2019 version 7.4.  We have decided to start updating to PHP 7.3 and the move our hosting infrastructure to PHP 7.4 before the end of 2019.

The group that develops and maintains PHP is now getting more aggressive at releasing new versions and deprecating older versions. See the supported version information (https://www.php.net/supported-versions.php). Older versions of PHP may have security issues and new versions are consistently improving performance. To provide the best hosting we have been trying to keep current with the latest supported version of PHP.

How to Update to PHP 7.3

Our first step was to update to PHP 7.3. The process is really simple on Ubuntu 18.04.

Make sure everything is up to date on your server

sudo apt update
sudo apt upgrade

Then add a PPA that contains PHP version 7.3

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update

Then install the PHP version

sudo apt-get install php7.3 php7.3-curl php7.3-gd php7.3-mbstring php7.3-xml php7.3-xmlrpc php7.3-soap php7.3-intl php7.3-zip php7.3-imagick php7.3-fpm php7.3-mysql php7.3-bcmath

For Apache2 you must enable the PHP 7.3 module and disable the PHP 7.2

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

In the /php/7.3/apache2 directory we merged our php.ini from the /etc/php/7.2/apache2 directory together.

After you save your merged copy, you will again need to restart the Apache server

sudo service apache2 restart

We tested all of our sites on this version without any major issues found. We expect the update to PHP 7.4 when it is released using the same process.

If you are interested in what changed from version 7.2 to 7.3. This link will give you all the gory technical details Visit (https://www.php.net/manual/en/migration73.php).

Hopefully, if you are updating to the latest version of PHP, this blog post helps you out. If you have a website and are thinking about updating to PHP 7.3 send me a message