How to install Magento 2 ?

How to install Magento 2 – In this tutorial, we’re going to install magento 2 on web server. I’m using localhost. you also can use your VPS or shared hosting.

Requirement :

 

Step 1 : Download Mageno 2 at :https://www.magentocommerce.com/download

You also can select the version of Magento 2 that contains sample data.

Step 2 : Create a database. I named it ‘magento2’.

Step 3 : Extract magento 2 to folder /htdocs/magento2

Step 4 : Go to http://localhost/magento2 and start to install magento 2.

Install magento 2 step 1

After checking readiness you may get errors :

  • Your PHP Version is 5.6.10, but always_populate_raw_post_data = 0 :

Go to your php.ini file and find ‘always_populate_raw_post_data’ and set it to -1, remove the comma. If you’re using a shared hosting, you can add this code to your .htaccess file :

php_value always_populate_raw_post_data -1

  • PHP extension intl missing : Go to your php.ini file and find php_intl, remove the comma. Same for other extensions.

Please don’t forget to restart Apache after editing php.ini file. If you’re using a shared hosting, this is not necessary.

Enter all information during installation.

Install Magento 2 step 2
Install Magento 2 step 2
Install Magento 2 step 3
Install Magento 2 step 3
Install Magento 2 step 4
Install Magento 2 step 4
Install Magento 2 step 5
Install Magento 2 step 5
Install Magento 2 step 6
Install Magento 2 step 6

If you use magento 2 version which contains sample data, it will be installed automatically.

The installation would take about 10 minutes.

Install Magento 2

You will get this when everything is done.

Install Magento 2 - Success
Install Magento 2 – Success

 

CSS and JS files are missing
CSS and JS files are missing

If the CSS and JS files are missing after installation, please follow this instruction :

  • Open command prompt ( CMD ) or SSH client.
  • cd to mageno 2 directory.
  • Execute command:

php bin/magento setup:static-content:deploy

  • You should also check read permission of directory : /pub/static
  • If you want to develop an extension, please run this: :

php bin/magento deploy:mode:set developer

 

If you have any problems, please leave a comment or contact us.

Thanks.

One thought on “How to install Magento 2 ?

Leave a Reply

Your email address will not be published.