How to install Magento on XAMPP localhost

  • February 4th 2013

IN 1979 we had our first online shop, then by 1995 we had online pizza ordering facility and eBay, and then in 2008 we got Magento and because of it we now have more than 69 thousand dedicated e-commerce websites. The platform is used by many leading commercial brands including Nike, Onieda Limited, Olympus, and Paul Smith. Along with these 69 thousand websites, there are more than 61 thousand other sites that are using Magento as their content management system (CMS). It is the third most popular CMS for building e-commerce websites.

Magento is easy to use, easy to understand, easy to customize, light, fast and search engine friendly. There are three different editions available on the web Magento Go, Magento Enterprise and Magento Community edition. Out of them Go and Enterprise- are paid versions whereas Community edition is open source, hence is the free version of Magento.

Why install on Localhost

E-commerce sites are sensitive sites. Any bug or mistake while building an e-commerce site can even cause monetary losses. Even though Magento is a very secure platform for making such type of sites, it is always safer to test the build in a secure environment before making it live. Localhost installation of the site gives you that safe and secure environment in which you can test your site thoroughly and hammer out any kinks or glitches in the built.

How to install on localhost

Installing Magento on local host is not that difficult, just some few simple steps. For this tutorial we have used XAMPP virtual server. It is a free and open source and could be downloaded from here {http://www.apachefriends.org/en/xampp.html}. So let’s get started.

Step 1:- Install XAMPP local host

The first step is to Install XAMPP. The installation procedure of XAMPP is just like any other software. Just click the .exe file and follow the instructions. After you have installed XAMPP, go inside XAMPP folder and run xampp-control.exe, and start Apache and MySQL server.

Step 2:- Creating a database for installation

Open a web browser and go to http://localhost. Click on phpMyAdmin button on the left side panel. This will open the phpMyAdmin home screen from where you can create a new database.

Step3:- A unique user

After you have created a new database, go to Privileges tab and add a new user that has all the database specific privileges.

Step 4:- Download Magento

After creating the database, download Magento from the official website. We have used the community edition for this tutorial but you can use any other edition you like. Apart from this you can download sample data from the same site also. This sample data is important for installation.

Step 5:- Extraction

Unzip the Magento zip file in XAMPP/htdocs. Unzip the test data also. You can place the test data anywhere you like.

Step6:- Importing data

Open phpMyAdmin on the local host and open the database that you have created earlier. Click on the import tab. In Files to Import column click on Choose File button and browse the folder in which you have extracted test data. Choose the SQL file and then click on GO. This will import the test data into the Magento database.

Step7:- Some specific tweaks for Magento

Installing Magento requires some special tweaks. First open xampp/apache/conf folder and open httpd.conf in notepad or any other code or the text editor you prefer. I am a big fan of Notepad++. It’s free and open source but there are other code editors also. Now find and edit the line

#LoadModule rewrite_module modules/mod_rewrite.so

to

LoadModule rewrite_module modules/mod_rewrite.so

After saving the changes open xampp /php folder and open php.ini file in notepad or any other text editor you prefer. In php.ini change the line

;extension=php_mcrypt.dll

to

extension=php_mcrypt.dll

This wil enable mcrypt encryption functions that are used for securing parts and some functions of your site. Now in the same file change

;extension=php_curl.dll

To

extension=php_curl.dll

This will initialize curl support. Save php.in

Step8:- restart the apache and mySql

Now restart the Apache server and MySQL server through the xampp-control.exe.

Step9:- Install Magento

Now open a browser and visit http://localhost/magento/install. This will open the installation window of Magento in the browser. Follow the simple instructions and install as per your specifications

Step10: There is no step 10 you are done

Congratulations you are now a proud owner of Magento ecommerce site.

Ending notes

A thing to note is that Magento uses cookies to work properly. Some browsers have disabled cookies for local host. This will cause the admin login page to refresh even after entering the id and the password. However we were using Mozilla Firefox and we didn’t face this problem. Another solution is to add

127.0.0.1     magento.localhost.com      www.localhost.com

In the file C:/Windows/System32/drivers/etc/hosts. Through this you can now open your site using www.localhost.com.

Our Location

INDIA G-273, Sector-63, Noida, Uttar Pradesh 201301
Email: hr@creativeweblogix.com
Rated 4.8 out of 5.0 for over 16,472 projects by 10,648 clients.
© Copyright 2024 C W Logix Pvt. Ltd®. All Rights Reserved.