Upgrade PHP on Linux

Published on September 24, 2019 at 4:56 pm by reMarkable websites

For this example I will be upgrading from PHP 7.0 to 7.3. Remember to change your version numbers as required. Although not an official upgrade, a PPA is available for installing PHP.

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

Now change versions manually and restart Apache :-

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

Possible errors following upgrade

If any of your websites display the ‘missing MySQL extension’ error :-

sudo apt-get update
sudo apt-get install php7.3-mysql
sudo service apache2 restart

If any of your websites display the ‘XMLReader PHP extension is missing’ error :-

sudo apt-get update
sudo apt-get install php7.3-xml
sudo service apache2 restart

Tags:

Comments are closed here.

Back To Blog