I am currently trying to install Magento 2 on a server running php 5.4 and Plesk 12.5. My hosting company advises against upgrading the php version to support Magento 2 since it could potentially break Plesk. Instead they recommended to use Plesk's native support for multiple versions of PHP.

With Plesk I setup and installed PHP 5.6.14 to support Magento 2. I ran a test and the 5.6.14 is running fine on the domain I selected. However, running composer install still detects the older version of php since it is the server default.

Does anyone have any experience getting around this issue? All of the PHP files detect and run the updated version of PHP but composer install script and even just running php -v detects the outdated version of PHP.

How could I get Magento 2 up and running on this server?


closed as off-topic by KAndy, 7ochem, AreDubya, Pratik bhatt, Keyul Shah Dec 1 '15 at 1:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about third-party modules are generally off-topic because the scope of functionality and code are not available. For more information, see this meta post/answer." – KAndy, 7ochem, AreDubya, Pratik bhatt, Keyul Shah
If this question can be reworded to fit the rules in the help center, please edit the question.


Take a look at http://talk.plesk.com/threads/upgrade-default-php.334442/

If you use composer from command line, you should add correct path to php binary in PATH env.

For example, my system php is 5.5:
$ php -v
PHP 5.5.9-1ubuntu4.11 (cli) (built: Jul 2 2015 15:23:08)
$ which php

But I want to use php 5.6 installed by Plesk:
$ /opt/plesk/php/5.6/bin/php -v
PHP 5.6.13 (cli) (built: Sep 8 2015 11:53:39)
$ export PATH=/opt/plesk/php/5.6/bin:$PATH
$ php -v
PHP 5.6.13 (cli) (built: Sep 8 2015 11:53:39)

$ which php

Not the answer you're looking for? Browse other questions tagged or ask your own question.