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.
- XAMPP ( or other web server) You can download XAMPP at : https://www.apachefriends.org/download.html
- PHP version >= 5.5 ( which is already included in XAMPP new versions ).
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.
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.
If you use magento 2 version which contains sample data, it will be installed automatically.
The installation would take about 10 minutes.
You will get this when everything is done.
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.