Install Magento on Ubuntu 16.04 XAMPP with PHP 7.1.1 – How to Guide

linuxmagento2php-7xampp

I'm totally new to Magento. I'm trying to install Magento 2 Community Edition on my XAMPP on Ubuntu 16.04 that having PHP version 7.1.1.

It gives an error :

PHP Version Check Your PHP version is 7.1.1. The required PHP version
is ~5.6.5|7.0.2|7.0.4|~7.0.6. Hide detail Download and install PHP
from www.php.net using this PHP Documentation. For additional
assistance, contact your hosting provider.

Is there any way to install Magento with this configuration ?

Edit :
My question is regarding PHP version, and with current PHP version is it possible to install Magento, or I've to downgrade it. is my question ?

Any kind of help is Appreciated. Thanks in advance.

Best Answer

Yes The error shows correct . Because Magento 2 won't support PHP version 7.1.1.

Both Magento 2.0.x and Magento 2.1.X both Support PHP 7 Version but with limited version Edition.

Magento 2 compatible with PHP Version 7.0.x to 7.0.6 in that 7.0.2 and 7.0.4

So ultimately you need to downgrade your PHP version 7.1.1 to At least 7.0.4

Kindly check Technolgy stack requirements for magento 2 below links are more helps to you :

http://devdocs.magento.com/guides/v2.1/install-gde/system-requirements-tech.html

http://devdocs.magento.com/guides/v2.0/install-gde/system-requirements-tech.html

Update :

To Downgrade Php version from 7.1.1 to Php version 7.0.4

Run below commands in sequence :

1) sudo add-apt-repository ppa:ondrej/php

2) sudo apt-get update

3) sudo apt-get remove php7.1.1

4) sudo apt-get install php7.0.4

5) sudo service php7.0-fpm restart

For more reference refer this link - https://askubuntu.com/questions/856793/upgrade-to-the-specific-php-7-1-from-php-7-0-in-ubuntu-16-04