1. Alternate version php 7.0.24 - my site.
  2. Native version PHP 5.2.6 - my server.

Composer doesn't want to update magento (it defined version PHP 5.2.6).

How to specify for the script an alternative version PHP?

1 Answer 1


Check the list of available php versions in your server using below command.

which php

Now, suppose your php version is php70, then you can run the cli command using your specific php version like this

php70 bin/magento setup:upgrade

If you want to run composer update command then you have to define your php file path then enter your command For example:

/usr/bin/php70 composer update

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.