How to update PHP version for WordPress with OpenLiteSpeed from 7.3 to 7.4 (lastest)

Hello, And thanks in advance for all your comments. I created a Wordpress website using latest tutorial for it, unfortunatly the latest isn’t so new, and i did install PHP 7.3 and i would love to install 7.4 for my new wordpress website.

  1. How to install the PHP 7.4 on Ubuntu 20.04?
  2. And OpenLiteSpeed packages.
  3. How to delete the old PHP 7.3 ?

Thanks for all


Hello there, You can try this way- Open a terminal window on your Ubuntu Server. Issue the command sudo apt-get install phpmyadmin php-mbstring php-gettext -y. When prompted, type your sudo password. Allow the installation to complete. I hope this will help Best regards

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.

Hello all,

For native OpenLiteSpeed/LiteSpeed, we can install PHP from LiteSpeed official repository.

  1. wget -O - | sudo bash


Since the image should have this repository installed, we can simply install packages directory like this

Example for lsphp80

  1. apt-get install lsphp80 lsphp80-common lsphp80-mysql lsphp80-memcached lsphp80-redis lsphp80-opcache lsphp80-curl lsphp80-imagick -y

OpenLiteSpeed comes with PHP detached mode by default, so need to restart PHP with the command killall -9 lsphp to make settings take effect.


In your case, you can replace lsphp80 with lsphp74 and it should work

Thank you @qtwrk

  1. When I do php --version I get “PHP 7.4.3” and should be 7.4.9 Already reboot the droplet and nothing changed.

About the PHP73 I am afraid to remove it again, so I decided to leave it.

Thanks for all

Thank you @qtwrk for your support. The last step “apt remove lsphp73” breaks my wordpress site, maybe, somewhere is using the old 7.3.

I need to find what and where is using 7.3

Thanks for all your kindness