There is official documentation. This guide assumes you already have a functioning LAMP-stack with the minimum Magento 2 requirements (5.4X<=PHP<=5.5.X & >= MySQL 5.6.X).

There are five steps to complete install magento 2 on window :


1. Install Composer on Window

Download and run Composer-Setup.exe – it will install the latest composer version whenever it is executed.

2. Download Magento 2

If you want to set up magento2 project in htdocs directory. Then run below command line in htdocs directory – it will create magento2 directory.

cd htdocs

git clone

cd magento2

composer install




3.Create The Database

You can use database tool to create new database named magento .

4. Install Magento 2

I set up a local site, so I link to  : localhost/magento2 to do install magento 2.


5. Install sample data

After step 4 finish, you will have a fresh install magento 2 site. If you want to add some sample data, you should do this step.

cd magento2

composer config repositories.magento composer

composer require magento/sample-data:0.42.0.beta1 magento/sample-data-media:0.42.0-beta1 –dev



It will take a while to download sample data package.After it’s done, execute the sample data installer:

php dev/tools/Magento/Tools/SampleData/install.php –admin_username=username

That’s it. Happy coding !!! Hope that’s a clear guide to help you save your time when set up magento 2 site. You can link to resources for further information.


Installing Magento 2 with Composer

Install the Magento software using the Setup Wizard