I'm currently trying to upgrade Magento 2.3.4 CE, to 2.4.0 CE. However I was constantly getting "Component Dependency" errors.

I then tried to upgrade in SSH but got the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].
    - magento/product-community-edition 2.4.0 requires php ~7.3.0||~7.4.0 -> your PHP version (7.1.33) does not satisfy that requirement.

I have changed the PHP version in Plesk to 7.4.10 but when I try to upgrade Magento I reveive the same error and using the command php -v gives the following error:

PHP 7.1.33-17+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug  7 2020 14:47:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.33-17+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Can anyone tell me how to change the PHP version in SSH please?

  • I've tried it, thanks. I'm afraid it doesn't work for me.
    – CJNotts
    Commented Sep 23, 2020 at 13:48
  • Try using php73 <command> instead of php <command> than Commented Sep 23, 2020 at 19:32

1 Answer 1


You can run sudo update-alternatives --config php and then an interactive window will open and you will be able to select the installed php versions, or you can simple do sudo a2enmod php7.4 and then run sudo update-alternatives --set php /usr/bin/php7.4

  • Thank you. Unfortunately, we use a Plesk control panel and cannot run sudo commands.
    – CJNotts
    Commented Oct 19, 2020 at 7:52
  • Did you have a look at the docs in Plesk, there is an explanation on how to change the php version? Commented Oct 19, 2020 at 7:59

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.