Question

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

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello all,

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

  1. wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash

More, https://docs.litespeedtech.com/extapp/php/getting_started/

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.

More, https://docs.litespeedtech.com/cloud/images/wordpress/#how-do-i-use-lsphp80

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