Jose Manuel Andrade Pereira's picture

Good morning, afternoon or evening to the entire turnkey Linux community.

A few days ago I was testing LAMP to install a WordPress blog, and I came up with the idea of upgrading to php 7.3 for WordPress security requirements, I have been reading on several forum sites and other web pages to upload it to php 7.3 and Do not fail in the attempt.

How update Turnkey Lamp 15.1 PHP 7 to PHP 7.3

1. Deploy LAMP VM or Physical Machine, apply updates and any stuffs.

2. Goto ShellBox, enter credentials:

apt-get -y install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
apt-get update

Reboot your VM o Wait to Refresh new Repo.

apt update
apt install php7.3
a2dismod php5 php7.0
a2enmod php7.3

service apache2 restart

apt update
apt install samba
apt install webmin-samba
apt install php-mysql

service apache2 restart

3. Goto Webmin, and then go System->PHP Configuration-> click top left gear, and change

/etc/php/7.3/apache2/php.ini=Configuration for mod_php
/etc/php/7.3/cgi/php.ini=Configuration for scripts run via CGI
/etc/php/7.3/cli/php.ini=Configuration for command-line scripts

4. Save Done.

NOTE: If there is something I missed, let me know, I think it works fine for now and it has been updated to PHP 7.3 correctly.

-----------------------------------------------
[optional] wordpress php 7.3 essentials:

apt install php7.3-bcmath
apt install php7.3-curl
apt install php7.3-imagick
apt install php7.3-gd

Forum: 
Tags: 
Jeremy Davis's picture

I'm sure others will get value from your post, so thanks for sharing.

FWIW, I'm currently working on our v16.0 release (based on Debian 10/Buster). There is no ETA yet (will be released ASAP - i.e. "when it's ready"). TurnKey v16.0+ appliances that include PHP will provide PHP7.3 by default (from the Debian repos). Although we may well include the sury.org repo to allow users to update (or downgrade) PHP if they wish (most likely disabled by default).

zyrus's picture

Hello,

thx for the greate contribution.
I have a question above your constribution.
Can I do that exactly the same way by Turnkey Linux Wordpress VDI?

Thx fpr your answer :)

Jeremy Davis's picture

Yes, Jose's instructions should work with any v15.x version of TurnKey WordPress. In fact, it should also apply to any v15.x LAMP based TurnKey server! :)

Depending on which plugins you are using, you may need/wish to install some additional PHP libraries. Although if you follow Jose's instructions, that should be enough for most scenarios.

If you have any issues, please post back.

Add new comment