0

I'm trying to run 'wp --search-replace' within a vhost webroot on an apache host.

The operation returns:

Please check that the `mysqli` PHP extension is installed and enabled.
If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums. Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

However, this host has mariadb installed and running. And PHP can connect to it.

I have another vhost running a WordPress site on the same host. The other site is functioning perfectly and has no trouble connecting to mysql.

Why is wp-cli failing to connect to the database?

1 Answer 1

0

There was nothing wrong with the host configuration.

The php version being used by the shell was different from the php version that the webserver passes requests to.

The problem was solved by installing a mysql extension for the php version that the shell runs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.