In this tutorial, we will go through step by step to install Magento store on Xampp Localhost, this installation includes 5 main steps:
- Install Xampp
- Pre-configuration before installing Magento
- Install Magento on Localhost
- Recommeded settings after installing Magento
- Picking a good hosting to make your store go live: Top 5 Magento hosting with best performance reviews
- Refer this link for complete step by step Magento 2 installation on Xampp local host guide
1. Installing Xampp on localhost.
We have a full Xampp video installation tutorial, you can see this guide here (video) => How to install Wamp server on windows 7
2. Pre-configuration before installing Magento.
* Config php.ini
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 & Sample data from http://www.magentocommerce.com/download.
After downloading the files, 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 phpadmin and create a new database (“magento”) and import data sample you’ve just downloaded:
Create Database “magento”:
Next, import sample database:
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 “Continue” to proceed to next step where we can config locale, timezone and default currency.
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 go to database configuration page
Now, enter database information:
+ Host: host name (localhost)
+ User name: username of database user
+ Password: password of user
+ Table prefix: prefix of table in database
Well done, now click on “Continue” to start the installation.
Now, you can enter Magento admin details:
+ First name
+ Last name
+ 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”. For frontend, click on button “Go to Frontend”.
4. Some recommended setting after installing Magento.
* Show images of sample products
By default, after installing Magento you will see blank image from sample products. To get them displayed, copy media folder in sample data zip file (downloaded from Magento) and put this folder to sub-folder root in Magento installation folder
* Reindex data
Magento use many tables to index data from different tables, this helps increase website speed. Therefore, every time data in main table changes, we need to reindex data for indexer table. To go to indexer management section, first log in to backend of your Magento site:
In admin dasboard, go to System->Index Management
Click on “Select All” and choose action “Reindex data”. Click “Submit” to start data reindex process.
* Refresh cache
Magento use 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 change.
In admin section, go to System-> Cache Management.
Click on “Select all” and select action “Refresh”. Now, click on “Submit” to start refreshing all types of cache in Magento.
5. Make your store go live
When you’re ready with local host installation of your Magento site, you can put it online by uploading it’s files to a live server. For a recommended list of Magento hosting provider, you may refer this article: Top 5 Magento hosting to start your online business
My last words
You’ve just go through the steps of installing a Magento site on Localhost Xampp, I hope you find this tutorial helpful. You can also click here for more Magento tutorial for beginners, if you have any problems with the installation, drop a comment here and I will help you with every issue.