How to update php version from 7.3 to 7.4 with OLWS on Ubuntu 20.04?

saz99

New Member
#1
Can anyone help me update the PHP version of my WordPress website from PHP 7.3 to 7.4?
I am using Digital ocean hosting and have deployed my website using WordPress on Openlitespeed package from the digital ocean marketplace. However, I always end up getting a critical error on my website.

Here are the commands I tried on the digital ocean console -

sudo apt-get install software-properties-common
sudo add-apt-repository ppa: ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y php7.4

I also changed the script header by following Step 5 of this guide: (link) https://www.howtoforge.com/tutorial...tos-8/#step-configure-openlitespeed-with-php-

I am a noob, so if anyone can share a step by step guide, it will be wonderful. Thank you so much in advance.
 

saz99

New Member
#5
I would also recommend you should use Cyberpanel + OLS together since free cyberpanel has automated a lot of stuff including installation of multi php versions. It will make the life much easier.

but you can not install cyberpanel on your exiting OLS, it should be a bare OS.

https://cyberpanel.net/docs/installing-cyberpanel/
I actually don't want to use cyberpanel as it consumes a lot of resources on my $5 droplet.
 
#8
@saz99
@Cold-Egg

I am in @saz99 previous situation with 7.3 on Digital Ocean Hosting for a Wordpress website.
Did @Cold-Egg suggestion, thank you for that. Installing PHP 7.4.9

But, when I do PHP --version, it shows 7.3.17 not 7.4
And the same happens at Wordpress, is current running 7.3.17.

So, I do appreciate all your comments in advance for these questions:
1. How to enable PHP 7.4
2. How to delete PHP 7.3
3. And if is safe to delete PHP 7.3 after enable 7.4

Thanks for all
Era
 

Cold-Egg

Administrator
#9
Hi,

It should works on WordPress site, did you restart php yet?
Code:
killall -9 lsphp
PHP --version shows 7.3.17 is normal, because it has a softlink to lsphp73. Feel free to use follow command to link php74
Code:
ln -sfn /usr/local/lsws/lsphp74/bin/php /usr/bin/php
Please keep php73 exist

Best,
Eric
 
Top