Show the WP-CLI version and the PHP it uses
which php version does wp cli use | check wp cli version | wp cli wrong php version | wp-cli | php | pleskwp --infoShows which PHP binary and which php.ini WP-CLI runs with, plus the WP-CLI version and the paths to the global and project config. On Plesk servers, the command line often uses a different PHP version than the website. That explains errors that only occur in WP-CLI.
Note: Force a specific Plesk PHP version with /opt/plesk/php/8.3/bin/php /usr/local/bin/wp, provided WP-CLI is installed there. Update with wp cli update (Phar installation, requires root).
Also searched as
- which php version does wp cli use
- check wp cli version
- wp cli wrong php version