PHP Fatal error: Uncaught Error: Call to undefined function mysqli_init()

#1
I'm using OpenLiteSpeed WordPress version 6.8.1 on Ubuntu 24.04, hosted on a DigitalOcean droplet. Everything worked fine with the first website during the initial setup.

I downloaded vhsetup.sh to add a second site, and it's working fine too.

Then, I added a third site but I encountered the following error message:

Code:
certificate has been successfully installed...
Web Server Restart hook already set!
Please choose whether to install WordPress or ClassicPress
Install WordPress? [y/N]: y
The Application you input is WordPress. [y/N]: y
PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in phar:///usr/local/bin/wp/vendor/wp-cli/config-command/src/Config_Command.php:217
Stack trace:
#0 [internal function]: Config_Command->create()
#1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func()
#2 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(441): WP_CLI\Dispatcher\Subcommand->invoke()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(464): WP_CLI\Runner->run_command()
#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1234): WP_CLI\Runner->run_command_and_exit()
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process()
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#10 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#11 /usr/local/bin/wp(4): include('...')
#12 {main}
  thrown in phar:///usr/local/bin/wp/vendor/wp-cli/config-command/src/Config_Command.php on line 217
Setting WordPress
Install litespeed-cache.zip
ed exist
Finish WordPress
The script added a virtual host and database, but when I visited the website to set up WordPress, I entered the database username and password manually, and it was unable to write to the wp-config.php file.

I checked the permissions of the /var/www/thirdsite folder. They appear to be correct, the folder is owned by www-data:www-data and has permissions set to 775

The first and second sites are still running fine.
 
Top