How to update PHP on virtual hosts?

mcbsys

New Member
#1
I have OpenLiteSpeed 1.7.19 and CyberPanel 2.3 Build 2 running under Ubuntu 20.04.6 on Azure. I have 10 virtual hosts, four running WordPress. I want to upgrade all of them from PHP 7.4 to 8.1. Each virtual host seems to be running its own PHP already; the Handler Name is my domain name + random numbers, e.g. domai26413, domai1845, etc. Maybe these were created by CyberPanel when I added WordPress sites?

Steps followed (starting from https://docs.litespeedtech.com/cloud/images/wordpress/#how-do-i-use-lsphp81).

1. apt install lsphp74 lsphp74-common lsphp74-curl lsphp74-imagick lsphp74-imap lsphp74-json lsphp74-memcached lsphp74-mysql lsphp74-opcache lsphp74-redis -y

2. Change all virtual hosts to use main lsphp app.

3. After reboot, WordPress shows PHP is 8.1 but then it prompts for FTP credentials to install plugins. So, it seems it the vhost-specific PHP is required for PHP permissions.

4. Change back to vhost-specific PHP and reboot. Plugin installs okay but PHP is back at version 7.4.

Now I realize I probably need to update through CybperPanel, but when I use the UI to "Select PHP" as "PHP 8.1", I get the error message "Cannot modify website. Error message: name 'IncScheduler' is not defined". I guess I can try to update CyberPanel...
 
Top