Why does WP-CLI throw a critical database error on managed hosting (Plesk/cPanel)? #34
Answered
by
Kevinchamplin
Kevinchamplin
asked this question in
Q&A
-
|
Why does WP-CLI throw a critical database error on managed hosting (Plesk/cPanel)? |
Beta Was this translation helpful? Give feedback.
Answered by
Kevinchamplin
Jun 13, 2026
Replies: 1 comment
-
|
The system |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Kevinchamplin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The system
phpon PATH is often a minimal CLI build without mysqli/mysqlnd, so any WP-CLI command that touches the DB dies. The web stack uses a different, fully-loaded PHP managed by the panel — invoke wp with that one, e.g. /opt/plesk/php/8.3/bin/php /usr/local/bin/wp --path=/path/to/wp. Verify withphp -m | grep mysqlion each binary.