How to install Magento 2.x on XAMPP server ( Localhost ).
In this tutorial, we will go through step by step installation of Magento store on Xampp Localhost, this installation includes 4 main steps:
2.Pre-configuration before installing Magento.
3.Install Magento on Localhost.
4.Recommended settings after installing Magento.
1. Installing Xampp on localhost.
We have a full Xampp installation tutorial, you can see this guide.
2. Pre-configuration before installing Magento.
After starting Xampp, click on “Config” button of Apache
In php.in, turn on these extensions:
Note: simply remove “;” at the beginning of each line to enable the extensions.
Next, start apache and mysql.
Config hosts file
In your computer, locate C:\Windows\System32\drivers\etc\hosts. Edit the file with notepad and insert this line
3. Install Magento on localhost.
Step 1: download latest Magento CE (Community Edition) with sample data from http://www.magentocommerce.com/download.
After downloading the files, the exact source code of Magento and put to PHP folder (www on appserv or wamp, htdocs on xampp).
Step 2: import sample data.
Go to phpMyAdmin and create a new database ‘Magento’.
Create Database “Magento”:
Next, Go to privileges tab, add a user account
Create the Database user by adding Username, Hostname (Here it is localhost) and password.
Select Check all privileges to database ‘Magento’ and click on ‘GO’ button.
Check all Database-specific privileges and click ‘GO’
Note: You can download sample data from link http://www.magentocommerce.com/download.
* Step 3: Setup
Assuming that we install Magento to folder “Magento”, now, go to your browser and access this link: http://localhost.com/magento
Now you will see Magento installation interface:
Select “I agree to the above terms and conditions” and “Next” to proceed to next step to start Readiness check. In this tab, you can check the requirements are met or not.
If the Magento requirements not met, it will show the error. Click “Next” when you are ready to continue.
Once it passed the readiness test, click “Next” to go to database configuration page
Now, enter database information:
+ Host: host name (localhost)
+ Username: username of database user
+ Password: password of user
+ Table prefix: prefix of table in database
Now, Installer automatically set you the administration panel address, Click Next to continue.
Modify these options for your Magento site:
+ Locale: Language
+ Timezone: your store timezone
+ Default currency: default currency you want to use for your store
After you’re done, click on “Continue” to enter Magento admin details:
+ User name
Click “Continue” to finish the installation.
Now we’ve done with Magento installation on localhost.
You can go to admin section by clicking on button “Go to Backend”. Alternately, type the URL “http://localhost/magento/admin_****” on the browser.
To go front end, click on button “Go to Front end” or use “http://localhost/magento”.
4. Some recommended setting after installing Magento.
Magento uses many types of cache to increase load speed as well as reduce the number of database queries. So it’s essential to refresh these caches every time we make a change.
In the admin section, go to System-> Cache Management.
Click on “Select all” and Flush Magento Cache. Which start refreshing all types of cache in Magento.