• I entered wp –info and received the contents as below:

    Shell:	/bin/bash
    PHP binary:	/opt/alt/php56/usr/bin/php
    PHP version:	5.6.40
    php.ini used:	/opt/alt/php56/etc/php.ini
    WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
    WP-CLI vendor dir:	phar://wp-cli.phar/vendor
    WP_CLI phar path:	/home/canadaxp/dev
    WP-CLI packages dir:	
    WP-CLI global config:	
    WP-CLI project config:	
    WP-CLI version:	2.0.1

    But the commande line ‘php -v’ gave me back another version:
    PHP 7.3.29 (cli) (built: Jul 6 2021 14:57:07) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.29, Copyright (c) 1998-2018 Zend Technologies

    I checked in wordpress back-end, it was 7.3 in the section of site healthy tool.

    Because except of wp –info, others wp cli command caused the errors:
    Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in /home/…/wp-content/plugins/woocommerce/woocommerce.php on line 57

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘different PHP version by wp –info and by php -v’ is closed to new replies.