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 Jul 6 '19 at 16:54

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
| improve this answer | |
  • 1
    I purged the old version and that fixed the error, but your solution also works fine, thanks! – Anna Mouraviova Jul 8 '19 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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