Wednesday, November 30, 2016

Install Magento 2 on Localhost With PHP7

New version of Magento changed with a new structure and design that improves features which are convenient. You can also check all changes and features on the Magento official website and you can also download latest version from there.
If you are using Magento 2.0.X than its support in PHP 5 but when you use latest Magento 2.1.x than it's supported in PHP 7 & MySQL 5.7 and it's also support Elasticsearch 1.0. Here I describe you to install Magento 2 using EasyPHP DevServer v16. 1 including Apache 2.4.17, PHPv7.0.1, MySQL v5.7.9 and PhpMyAdmin v4.5.2.
For installing Magento using an EasyPhp server without installing Wamp or xamp you must download EasyPhp for your system and install it.
Than download composer and install in system with `php.exe` path from EasyPhp installation.
Here below describe the steps for run Magento 2 on the local server.

  • Start EasyPHP DevServer by clicking on EasyPHP DevServer -> Open Dashboard (If it's display msvcr100.dll error than download "Microsoft Visual Studio C++ 2015 & 2013" according to EasyPhp installation folder(84x or 64x) not window system)
  • Click on HTTP Server -> Apache -> PHP v7.0.1 and Port 8888 -> start
  • Click on DB Server -> MySQL -> start.
  • Back to Dashboard again and click on the Portable Direction link to detect the directory, then extract Magento 2 files which we just download before. This is ‘ROOT’ Directory of your local hosting.
  • Extract all files from the Magento 2 zip file to directory.
  • Create new database from Dashboard -> PhpMyAdmin.
  • Before install Magento first check your `php.ini` file in EasyPHP_FOLDER/eds-binaries/php/PHP_VERSION and remove ";" for active below extensions.
    • mcrypt
    • mhash
    • mbstring
    • Curl
    • simpleXML
    • gd
    • xsl
    • soap
    • openssl
    For example change ";extension=php_curl.dll" to "extension=php_curl.dll"
  •  Now open magento 2 directory folder in your browser "http://127.0.0.1:8888/MAGENTO2/"(server Url according to you set in EasyPHP dashboard)
  • Start Magento Installation and check 'Readiness'. If you got any error then check `php. ini` file PHP version and restart the Apache serve.
    • If you got Curl starting Error than copy `libssh2.dll` from php directory to `Window/system` directory
    • Copy all `icu*.dll` files from eds-binaries/php/PHP_VERSION` to `eds-binaries/httpserver/APACHEVERSION`
    • If you got any other extension error than copy related dll file from `eds-binaries/php/PHP_VERSION` to `eds-binaries/httpserver/APACHEVERSION`
  • Than set database details and store configuration and complete installation process.
  • Now open command prompt using window+R or search `cmd`.
  • Enter Magento installation directory in CMD and run below code `composer install`
  • Perform installing static content to deploy on you Magento shop by typing `php bin/magento setup:static-content:deploy` (Or you can use `php -dmemory_limit=6G bin/magento setup:static-content:deploy`)
  • Clean Magento 2 cache by typing ‘php bin/magento cache:flush’ in the CMD
  • Re-index Magento Static Blocks by typing `php bin/magento indexer:reindex`.

Now your magento 2 working complete on your installation URL http://127.0.0.1:8888/MAGENTO2/
If you got any error or fetch any problem during installation than you can re-install it using below process.

No comments :

Post a Comment