最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wp cli - WP CLI info showing correct PHP binary but wrong version of PHP

programmeradmin3浏览0评论

When a run a command such as wp plugin update I get the message: "Your server is running PHP version 5.4.13 but WordPress 5.2.2 requires at least 5.6.20"

I don't even have PHP 5.4 installed in my server.

When I run wp cli info I get the following:

PHP binary: /opt/plesk/php/7.2/bin/php
PHP version:    5.4.13
php.ini used:   /etc/php.ini

Any idea what could be causing this? I updated WP CLI to version 2.3 thinking maybe that would help but I get the same results.

Running CentOS 6 if that makes a difference.

When a run a command such as wp plugin update I get the message: "Your server is running PHP version 5.4.13 but WordPress 5.2.2 requires at least 5.6.20"

I don't even have PHP 5.4 installed in my server.

When I run wp cli info I get the following:

PHP binary: /opt/plesk/php/7.2/bin/php
PHP version:    5.4.13
php.ini used:   /etc/php.ini

Any idea what could be causing this? I updated WP CLI to version 2.3 thinking maybe that would help but I get the same results.

Running CentOS 6 if that makes a difference.

Share Improve this question asked Sep 4, 2019 at 19:20 Best Dev TutorialsBest Dev Tutorials 4451 gold badge7 silver badges21 bronze badges 5
  • What does /opt/plesk/php/7.2/bin/php --version return you? – norman.lol Commented Sep 4, 2019 at 19:32
  • @leymannx It shows PHP 7.2.22 – Best Dev Tutorials Commented Sep 4, 2019 at 19:54
  • And just php --version? – norman.lol Commented Sep 4, 2019 at 20:21
  • @leymannx php --version shows: PHP 7.0.27 – Best Dev Tutorials Commented Sep 4, 2019 at 20:27
  • Wow, by default even the CentOS 7 official software package repositories have PHP 5.4. Seems something got mixed up when you installed the other PHP versions. – norman.lol Commented Sep 4, 2019 at 20:49
Add a comment  | 

1 Answer 1

Reset to default 1

Edit your .bash_profile and modify the PATH with :

export PATH=/opt/plesk/php/7.2/bin:$PATH

then reload with :

source ~/.bash_profile

More info here.

发布评论

评论列表(0)

  1. 暂无评论