When I access the website, I get:

Magento supports PHP 7.1.3 or later. Please read Magento System Requirements.

I have PHP 7.2.19 on my stack

Where do I look for the problem?


  • what commands are you using for changing php version?
    – Mohit Rane
    Commented Jul 6, 2019 at 16:54

1 Answer 1


Use below commands for changing PHP versions

From PHP 7.1 => PHP 7.2

sudo a2dismod php7.1
sudo a2enmod php7.2
sudo service apache2 restart
sudo update-alternatives --set php /usr/bin/php7.2

check which PHP version you're using with this command

php -v
  • 1
    I purged the old version and that fixed the error, but your solution also works fine, thanks! Commented Jul 8, 2019 at 14:21

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.