Although Magento is a top platform for doing e-commerce right now, it still has little bugs in it and those bugs may spoil your business if you don’t test your store in the local machine before deploying and running it in real life. Moreover, sometimes when you install new themes and new extensions, things may not work out the way you want and can break what you have built for the last few months apart. Therefore, it’s necessary to have a copy of your store in the local server to either test out new themes, extensions or make changes to it. In this post, I will guide you how to properly install Magento in your local machine properly in less than 5 minutes.
Step 1: Grab a copy of XAMPP or WAMP server
In the case you don’t know what are XAMPP and WAMPP, that’s fine because those terms were new for me half years ago as well
Basically, XAMPP and WAMP are the software which will install PHP, MySQL, PHPMyadmin and all of other things that you need to set up a local development environment in a snap. In the other words, you don’t need to download PHP, MySQL, install each manually and come across frustrating steps to connect these two together. Just download XAMPP or WAMP, and you will see how quickly it is to set up the local development environment in your computer.
So step one, grab a copy of XAMPP at http://www.apachefriends.org/en/xampp.html
Grab a copy of WAMP at http://www.wampserver.com/en/
Either one works with me. In my opinion, WAMP offers more convenient because you can disable/enable Apache and PHP settings in the context menu. With XAMPP, you need to open the httpd.conf and php.ini to edit them manually.
After you have downloaded and installed either XAMPP or WAMP, run it. Go to your favorite browser, type http://localhost to see whether your local machine has started and run properly. If you have troubles, hit me in the comment section and I will be gladly to help you out.
Step 2: Download copy of Magento and sample data
Go to Magento and download a latest copy of this software here (in zip file). Extract the folder to C:Xampphtdocs or C:wampwww (if you install them in default mode).
Download a sample data and extract them to your computer
Step 3: Create database and populate the sample data
Here are the steps on how to do it:
- Go to http://localhost/phpmyadmin
- Create a new database
- Import a sql file that you just extracted from the sample file into this database.
Step 4: Raise the execution time limit of PHP
An error happened when I tried to install Magento locally so I think I should include this step in my post. Go to C:Xamppphpphp.ini or C:Wampappsphp(version you are running)php.ini and find the line
max_execution_time = 30
Change it to:
max_execution_time = 180
What this line does is it increases the execution time of PHP to 3 minutes (180 seconds). When I installed Magento into my local server, it prompted me the error of execution time out so you should follow this step if you don’t want troubles during the installation.
Step 4: Install Magento
Browse to the location that you have extracted Magento. For example: With my computer settings, I browse to http://localhost/magento/install.php
Enter required information such as database name, username and password. After finishing entering all of the required information and hit Install, you will find Magento running in your local server successfully. Good job!
So I have guided you how to install Magento into local server properly and maybe less than 5 minutes. I hope you will find this tutorial helpful and I will see you in my next tutorial.

