Home » Tutorials For Beginner » How to install Magento on Xampp localhost

How to install Magento on Xampp localhost

In this tutorial, we will go through step by step to install Magento store on Xampp Localhost, this installation includes 5 main steps:

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

install magento on Xampp localhost 1 pre-configuration

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:

install magento on Xampp localhost 2 create apache

* 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.

install magento on localhost

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:

install magento on Xampp localhost 4 create new database

Create Database “magento”:

install magento on Xampp localhost create new database 2

Next, import sample database:

install magento on Xampp localhost 6 import sample data

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

install magento on Xampp localhost magento folder

Now you will see Magento installation interface:

install magento on Xampp localhost 8 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.

install magento on Xampp localhost 9

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

install magento on Xampp localhost 10 database configuration

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.

install magento on Xampp localhost 11 create admin account

Now, you can enter Magento admin details:

+ First name

+ Last name

+ User name

+ Password

Click “Continue” to finish the installation.

install magento on Xampp localhost 12 finish

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

install magento on Xampp localhost 13 Show images of sample products

* 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:

install magento on Xampp localhost 14 Reindex data

In admin dasboard, go to System->Index Management

install magento on Xampp localhost 15

Click on “Select All” and choose action “Reindex data”. Click “Submit” to start data reindex process.

install magento on Xampp localhost 16

* 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.

Refresh cache

Click on “Select all” and select action “Refresh”. Now, click on “Submit” to start refreshing all types of cache in Magento.

install magento on Xampp localhost 18 last setting

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.

About Brian Wilson

avatar
Brian is a freelance Magento developer with 5 years of experience with customizing Magento extensions, magento themes. He's interested in sharing Magento Tutorials to the community

10 comments

  1. avatar

    Great tutorial!

    Could you give me advice how to move exsisting shop to localhost? I would like test some features, upgrade on localhost and then move data back on server. It will be safer for me – I am rookie in Magento and do not want to make mistakes on real shop.

    Best regards,
    Marceli

  2. avatar

    Very nice tutorial, it’s very helpful for me… thank you so much

  3. avatar

    Hello Brian!

    I’m getting stuck in the configuration stage of Magento installation process. I followed each of your instructions but when I click on the ‘continue’ button, it shows “Database connection error” message. Could you help me out?

  4. avatar

    Hello Brial,

    I dont have ” extension=php_mcrypt.dll ” in my php.ini what’s wrong?

  5. avatar

    Hi, I wounder why you put on the Base URL http://localhost.com/magento ? instead of http://localhost/magento without the .com on localhost? Cause I followed your instructions and I get error page not found it always redirected to http://localhost.com/magento/ with .com on localhost. I tried to check on the database on how to change that URL but no avail. Can you tell me how to do that? thank you

  6. avatar

    Hello, I was able (finally) to settle Magento thanks to your didactic guide: version 1.91.1 and not 1.9.2 which does not run on.
    In the page ” Log in to Admin Panel, I bring in User Name and Password: I simply returns on this page.
    If I bring in an erroneous password, it shows ” Invalid User Name or. Password
    Data are thus correct. Why does not it thus does not thus display Dashboard as indicated?
    Did I miss anything?
    Thank you very much. Daniel

  7. avatar

    Bonjour, J’ai (enfin) pu installer Magento grâce à votre guide didactique : version 1.91.1 et non 1.9.2 qui ne marche pas.
    Dans la page “Log in to Admin Panel, je rentre User Name et Password : i revient simplement sur cette page. Si je rentre un password erroné, il affiche “Invalid User Name or Password.
    Mes informations sont donc correctes. Pourquoi n’affiche-t-il donc pas le Dashboard comme indiqué ?
    Ai-je raté quelque chose ?
    merci beaucoup. Daniel

  8. avatar

    Dear Sir,
    Please send me your email id

  9. avatar

    Hi,
    Will you please tell me how to upload this?

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top