How Upgrade PHP from 7.2 to 7.4 with OpenLiteSpeed

Hi, how do I update OpenLiteSpeed from PHP 7.2 to 7.4? Unfortunately I have little knowledge of the OpenLiteSpeed platform.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @rondinelealves,

You can follow these steps to install PHP 7.4 on your Ubuntu 18.04 Droplet(Not OpenLiteSpeed Droplet):

Add the PPA to your package repository list.

sudo add-apt-repository ppa:ondrej/php

Update your repository cache to ensure packages from the ondrej/php repository are available.

sudo apt-get update

To install PHP version from the PPA we use the following package name convetion phpX.X. For example, to install PHP 7.4 you would put php7.4 as the package name.

sudo apt-get install php7.4

Having said that, you’ll need to install a lot of other PHP extensions like

sudo apt-get install php7.4-mysql

You can find what you need as extensions based on your Website.

Hi @rondinelealves,

To install PHP 7.4, you can perform the following actions/commands on your droplet:

sudo dnf install epel-release

The above will add the proper repo to your system. Next install LSPHP packages from the official OpenLitespeed repository using the following command.

sudo dnf install lsphp74 lsphp74-mysqlnd lsphp74-process lsphp74-mbstring lsphp74-mcrypt lsphp74-gd lsphp74-opcache lsphp74-bcmath lsphp74-pdo lsphp74-common lsphp74-xml

That’s it. You are now done and have PHP 7.4


This is the case for how to set up lsphp74 on a virtual host, but it should also works in your case.