Can't install Wordpress using wp-cli due to mysql module not installed on PHP error

I attempted installing Wordpress using wp-cli (as I commonly do).

But I can’t install due to it coming back with the error, “Error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

The website has PHP 7.3 assigned to it, and as far as I can tell the MySQL module is installed (as one would expect). I double checked that using, sudo dpkg --get-selections | grep -v deinstall | grep php which indicates

lsphp74-mysql install

So I am at a loss as to what to do.

Any suggestions?

I’ve realised this issue is likely occurring because LS uses it’s own php version, lsphp73-mysql

wp-cli is testing for whether php73-mysql is installed, but it is not.

Can someone suggest a way around this? Or do I have to accept the only feasible way to install WP is via the Cyber control panel?

Yep, I suspect that’s the case.

I’ll find out if there’s a switch for wp-cli that can force it to install without checking for PHP related dependencies.

:v: Hi,

Do you have a solution? I encountered the same problem

Update your cyberpanel and then try will work.