Hello Magento buddies,

As a designer, developing themes for Magento might be something you would like to look into. But, unlike installing WordPress on XAMPP, Magento installation procedures can be a bit intimidating, especially for a designer who just wants to get it working so they can start developing themes and other pretty things. Where WordPress is the darling of the 5 minute installation, Magento takes a little coaxing to work.

Here’s a step-by-step procedure that will hopefully save you a headache. Please note that I run XAMPP, so this tutorial is written for XAMPP only and is on Windows.

DON’T MISS 2017 UPDATE: Magestore’s Ultimate Magento 2 Installation Guide (with Video Clip and Errors Fixed). And keep up with our Magento Tutorial.

To install Magento, you should follow these instruction:

  1. Webserver setup and PHP configuration.
  2. Magento Installation on localhost with XAMPP.

Webserver setup and PHP configuration in Magento installation

Step 1: Set up webserver

1. Make sure you have the latest version of XAMPP installed. You can get XAMPP on the Apache Friends website (now, the latest version is 7.1.8) http://www.apachefriends.org/en/xampp.html

2. After downloading XAMPP, please click on the file to install it on your computer.

Magento tutorial - Lesson 1

3. Select Components:

Plase select the same as in the image.

magento setup

4. Choose Install Location: XAMPP default location is C:\xampp. If you need to change the destination, click on the Browse botton to change your destination for XAMPP program and then click on Next to go to the next step.

webserver setup

magento installation

5.  Start installing XAMPP.

install xampp

6. Complete the XAMPP setup.

You will see the setup asks: “Do you want to start the Control Panel now?” Click on the Finish button to end this setup and XAMPP prompt to use.

finish magento setup

 Step 2: Config PHP

Magento tutorial

In the XAMPP Control Panel, you can see the row Apache, please click on the Config button and click PHP(php.ini), then remove comment “;” in some rows:


After that, please click on the Start button on 2 rows Apache and MySQL to start them:

 PHP configuration

 Step 3: Config host file

Open the file C:\Windows\System32\drivers\etc\hosts. Add the following code to the last row of the file:   www.localhost.com


This is the first part of Magento Installation, now take heed of next part of this guide.

Magento Installation on localhost with XAMPP

Step 1: Download magento and sample data

Using a browser, download the latest full released archive file from Magento.com. Switch to Release Archive tab and find your Magento version. The current Magento version is v1.9.3.4. To check your current Magento website version, you should read: How to check Magento version.

The archive file is available in .zip, .tar.gz, and .tar.bz2 formats for downloading (a zipped archive contains exactly the same files and is provided in different formats just for your convenience).

On your computer, extract Magento from the downloaded archive. Magento has a folder named magento containing all of the Magento files which will be created, for example, data has a file called “magento_sample_data_for_1.6.1.0.sql” and a folder called “media“.

Step 2: Import the Magento sample data into an empty store database

Create a new empty database for Magento.

Using a browser, enter the url: to create a new empty database by using phpMyAdmin:

magento installation step 2.1

Create an empty database named “magento”:


magento installation step 2.2

Import the sample data sql file (magento_sample_data_for_1.6.1.0.sql) into your empty Magento database:

Use the import function of your database management tool to import the data in the .sql file into your empty database.

magento installation step 2.3


Step 3: Installing Magento

Finally, we can start installing Magento on our local machine. First, restart your Apache and MySQL servers. If you didn’t stop them before and have been editing them while they were on, just stop them now and restart them. Copy magento folder after extracting Magento from the downloaded archive to xampp\htdocs:


magento installation step 3.1

Using a browser, enter the url: to start installing magento:

magento installation step 3.2

Tick the checkbox “I agree to the above terms and conditions” and click on the Continue button to continue. Then change the Time Zone, Locale and Currency and continue:


magento installation step 3.3

Next, please find the database: Host, Database Name, User Name and User Password:


magento installation step 3.4

Next, please fill in the Personal Information: First Name, Last Name and Email

And fill up the Login Information to use for admin (backend): Username, Password and Confirm Password


magento installation step 3.4

Also, you don’t need to worry about filling in the Encryption Key. Magento will generate a key for you on the next page (just like it says). It’s highly recommended that you write that key down somewhere so that you won’t forget it. Once you’ve finished filling out the form, click on the “Continue” button and write down your encryption key!

After you get your encryption key locked away in a fireproof safe, you can choose to go to Frontend or Backend of your new Magento installation.

magento installation step 3.6


Step 4: Copy media to source

Copy media folder after extracting the Sample data from the downloaded archive to xampp/htdocs/magento

magento installation step 4.1


Step 5: Refresh cache and reindex data

Please click the “Go to Backend” button in step 3, you can see the admin login page, you need to fill up Username and Password for admin as in step 6:

magento installation step 5.1

Reindex data:
Go to the admin page and then please see the System menu, click on Index Management:
magento installation step 5.2
You can see the Index Management page:
First, please click on Select All. For Action field, please select Reindex Data before clicking on the Submit button:
magento installation step 5.3
After the system reindex data, a success message will be shown:
magento installation step 5.4
Refresh the cache:
Go to the admin page, notice the System menu, please click on Cache Management:
magento installation step 5.5
Please click Select All. For action field, please select Refresh and then click on the Submit button:
magento installation step 5.6
After the system reindex data, a success message will be shown:

magento installation step 5.7

Step 6: Go to Frontend

Clicking on the “Go to Frontend” button in step 3, you can see the magento site:
magento installation step 6
That’s the end of the Lesson 1. Such a long Magento installation process, right? ^^
Hope that this post will help you to successfully install Magento – a great ecommerce platform.
See you again in lesson 2 about Magento Architecture!

Enjoy coding and see you later. Follow us in Magento Open Course for Magento Tutorial.


Why Magestore? We believe in building a meaningful & long-term relationship with you.


  1. errore installazione Magento

    Oggetto non trovato!
    L’URL richiesto non esiste su questo server. Se hai scritto l’URL a mano, per favore controlla che non ci siano errori.

    Se pensi che questo sia un errore del server, per favore contatta il webmaster.

    Non riesco procedere per questo blocco.

    Error 404
    Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.6

    • Bruce Reply

      I can’t help you without a more clear context. Would you double check your inserted URL?
      Also, our blog only accept English comments so next non-English comments will be deleted immediately, thank you.

  2. hello, i have installed successfully, however, the images in both backend and frontend not displaying. magento version 2.1. please advice.

    • Bruce Reply

      Could be problem with your Cache Management. Try Cache Management and flush all database.

  3. Hi, I am getting the following error during magento installation. Can you please help?

    Schema creation/updates:
    [ERROR] PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘9-‘ for key ‘EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_CODE’ in C:\xampp\htdocs\magento\vendor\magento\framework\DB\Statement\Pdo\Mysql.php:91 Stack trace: #0 C:\xampp\htdocs\magento\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(91): PDOStatement->execute(Array) #1 C:\xampp\htdocs\magento\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(107): Magento\Framework\DB\Statement\Pdo\Mysql->Magento\Framework\DB\Statement\Pdo\{closure}() #2 C:\xampp\htdocs\magento\vendor\magento\framework\DB\Statement\Pdo\Mysql.php(92):

Write A Comment