How to install Magento 2 on XAMPP in three simple steps?

Install xampp in Magento 2

Folks, our team has installed Magento 2 beta version 0.74.0 on their local machines, we are planning to migrate all our Magento 1 extensions to Magento 2 but before that we thought it would be good idea to share the Magento 2 installation process with the community.

According to our tech lead, this was done in 3 simple steps, hope this works for you as well

Step 1 – Install XAMPP

https://www.apachefriends.org/download.html (We install version 5.6.3 / PHP 5.6.3)

  • Edit php.ini to enable extensions as below:

            extension=php_intl.dll

            extension=php_openssl.dll

            always_populate_raw_post_data = -1

  • Open C:xamppapacheconfextrahttpd-vhosts.conf and the following entry

<VirtualHost *:80>

ServerAdmin magento2@dev.com

DocumentRoot “C:/xampp/htdocs/magento2”

ServerName www.magento2.dev

#ErrorLog “logs/dummy-host2.example.com-error.log”

#CustomLog “logs/dummy-host2.example.com-access.log” common

</VirtualHost>

  • Now open c:WindowsSystem32driversetchosts (as administrator) and add the following line

127.0.0.1              www.magento2.dev

Step 2 – Install Composer

https://getcomposer.org/download/

If you scroll down you will find Windows Installer

During install please make sure install shall menus option is selected

Select PHP.exe (C:xamppphpphp.exe)

Step 3 – Install Magento 2

  • Create Magento2 folder in c:xampphtdocs
  • Open git bash and run the following command

git init

git remote add origin https://github.com/magento/magento2.git

git pull origin master

  • Once Magento2 code is downloaded then right click on composer.json file and click composer install
  • Create database with name magento2
  • Open magento2.dev in your browser, this should show the set up wizard, follow the wizard and it should be done.
  • If the images are missing from admin or frontend then run the following command -:

php bin/magento setup:static-content:deploy

Hope the above article helps in some way, please leave us feedback or question related to Magento2 installation in the comment below.

Discover more from WHO WILL CARE eCommerce

Subscribe now to keep reading and get access to the full archive.

Continue reading