How To Install Magento Locally On Windows XP

By Jason Franco posted on Friday, February 19, 2010 - (How To's)

The following is a guide for those folks that want to setup a proper development environment for building out a Magneto cart on your local windows box. I’m one of those old school developers that like’s to have a multi-phased approach when it comes to developing, testing and deploying a website. The first step of this process is to get your local windows development box setup to properly run the MySQL Database, the Apache Web server and most importantly trick your machine into believing it’s the actual server that hosts the domain.

Now, we’ve checked online and seen a bunch of places saying that this is not possible and to have Magento working on a Windows box and that you need to install Ubuntu to get this working. This couldn’t be farther from the truth and just adds unneeded complexity. So let’s keep it as simple as possible.

  1. Download the XAMPP from Apache Friends: We’re currently using XAMPP Version 1.6.6a, however, feel free to use the latest. Which has some differences and some Apache/MySQL extensions turned on default, but it will all work the same.
    1. It’s a very simple install and you can follow the instructions without really changing any of the defaults. However, for the sake of this document, we’ll change the install directory to the use the original settings that XAMPP used to come with and install to:
      1. C:\apachefriends\xampp
  2. Once XAMPP is installed, we’ll need to setup our environment to handle multiple site development as well as for properly running Magento. We’re a web development shop, so we find that we need to work on multiple sites as once to properly support our customers.
    1. For the purpose of this document, we’ll be building out a website for CleanEase.
      1. Navigate out to your “C:\apachefriends\xampp\htdocs” directory and create the new “cleanease” folder:
  3. We’ll then need to make sure that both the Apache & MySQL environments are setup for what Magento needs.
    1. MySQL
      1. We’ll need to edit the configuration files to support the InnoDB transactional storage engine otherwise you’ll get nowhere fast. Navigate out to your local my.cnf file found at: C:\apachefriends\xampp\mysql\bin\my.cnf. Open this up into your text editor of choice and make sure that the InnoDB settings are not commented out. It should looks something like this:
        1. # Comment the following if you are using InnoDB tables
          innodb_data_home_dir = "C:/apachefriends/xampp/mysql/"
          innodb_data_file_path = ibdata1:10M:autoextend
          innodb_log_group_home_dir = "C:/apachefriends/xampp/mysql/"
          innodb_log_arch_dir = "C:/apachefriends/xampp/mysql/"
          ## You can set .._buffer_pool_size up to 50 - 80 %
          ## of RAM but beware of setting memory usage too high
          innodb_buffer_pool_size = 16M
          innodb_additional_mem_pool_size = 2M
          ## Set .._log_file_size to 25 % of buffer pool size
          innodb_log_file_size = 5M
          innodb_log_buffer_size = 8M
          innodb_flush_log_at_trx_commit = 1
          innodb_lock_wait_timeout = 50
        2. Make sure that the “skip-innodb” line is commented out, but all the other settings can use the defaults that are already specified. Save and close the file.
      2. We usually have MySQL installed as a service, so get into your Services Control Panel and restart it:
    2. Apache
      1. Configuring the php.ini file
        1. We’ll need to enable a few extensions for Magento to work properly. To do this, open up your php.ini file. The version of XAMPP we use (Version 1.6.6a ) has two php.ini files, however, the one that is really used by the web server is found in the Apache bin directory:
          1. C:\apachefriends\xampp\apache\bin\php.ini
            1. Note: On the newer version of XAMPP, we’ve found that they’ve finally cleaned things up and only have one php.ini file found in C:\apachefriends\xampp\php\php.ini. So please make sure to update this file.
        2. Make sure the following extensions are active. Meaning, that you just need to remove the “;” (semi-colon) character out from in front of it:
          1. extension=php_mcrypt.dll
      2. Configuring the httpd.conf file
        1. You’ll find this file located at:
          1. C:\apachefriends\xampp\apache\conf\httpd.conf
        2. Enable URL rewrites:
          1. You can do this by remove the “#” hash character in front of the following line:
            1. LoadModule rewrite_module modules/
        3. Change the Document Root to point to the website you wish to work on, in this case, we want to change this to the CleanEase project:
          1. DocumentRoot "C:/apachefriends/xampp/htdocs/cleanease"
          2. IMPORTANT: This is the best way to go about installing a local version of Magento on your box and will allow you to easily deploy this out to your production environment without having to jump through a bunch of extra hoops.
      3. We usually have Apache installed as a service, so get into your Services Control Panel and restart it:
  4. Next, go out and download Magento, you can find the No Registration download page here: Make sure to get the “Full Release - stable version” download and don’t mess around with the other ones, I’ve found that they just lead you down the wrong path and take far too long for an install process. For this document, we’re using version, which we downloaded on 2/10/2010 and now I see another version as of 2/12/2010. Why do these guys put out so many releases so quickly?
  5. Once this is downloaded, you’ll want to exact the zip file into the CleanEase folder: C:\apachefriends\xampp\htdocs\cleanease.

    As you can see from the files in the zip, it will still extract them to a “magento” folder, so we’ll just need to move all of those files one level up:
  6. Setting up your “hosts” file
    1. This is the most IMPORTANT step throughout all of this process. Without this step, the cookies of the Magento install will not work properly and the database will not properly install when going through the Magento setup.
    2. You can find your local “hosts” file in the following location:
      1. C:\WINDOWS\system32\drivers\etc\hosts
        1. There is no file extension, but you can easily open this in Notepad or any text editor.
    3. Make sure to add the following domain entry to point to your localhost IP address:
      2. It’ll look something like this:
    4. Save the file
  7. Create an empty database called “cleanease” within your phpMyAdmin instance:
  8. Now that you’ve done all the setup, it’s now time to hit your local instance via your favorite web browser to start the Magento Installation Wizard. Open up the website in your browser, and if you did all the above setup correctly, you’ll see the first part of the Magento installation screen:
    1. Feel free to use the default settings for the Localization:
    2. Make sure to enter in the “cleanease” database name, check also check the following:
      1. Skip Base URL validation before next step
      2. Use Web Server (Apache) Rewrites
    3. This part of the process will take a bit of time as its building out the database and setting up your environment. However, if all works well, it will take to the final step of the wizard to create the administrator user:

Once you get through this portion, it will ask you if you want to go visit the frontend or login to the backend. Feel free to login to the backend to start setting things up. A few things to note:

  • You can always use a different domain, it would be best to use the one you wish to ultimately install to.
  • In addition, you can use any database name or directory name you wish, but just make sure you use ones that are consistent with the domain name so you can easily track them.
  • Make sure to edit your httpd.conf file, specifically the DocumentRoot value to the directory you wish to run your other Magento instances.

Now that we’ve got this process down, we can finally use proven development techniques to get our websites looking exactly the way our clients want on our local boxes before we move them to production.


Comments (45)

By Jim posted on Thursday, February 25, 2010 @ 1:36 PM
Man, Magento is a tough cookie! Thank you so much for this guide. It has been a huge help for me. It seems like, in spite of all the hype over Vista and 7, there are still a lot of people running good ol' XP.

It is great to find that there are those who are looking out for the XP users.
By doggie192 posted on Wednesday, March 17, 2010 @ 2:19 AM
I use magento to run in wamp server. Finally come to admin login page, but cannot get into the admin page. It keep repeat the login page. How to solve this kind of problem?
By Nicholas Reed posted on Thursday, March 18, 2010 @ 10:45 PM
This tutorial is godly. I am using xp, but I still can't get past the login.
I've got this at the top of my hosts file localhost
(with a lot others)

when I go to or it just takes me back to http://localhost

One note is I installed from http://localhost and not, because I didn't enlarge the one of your images that shows that part.

What do you think I should do?
By Nicholas posted on Friday, March 19, 2010 @ 1:11 AM
Its all working. Just to REMOVE index.php and index.html from the HTDOCS folder. THATS IT!
By Justin posted on Wednesday, April 14, 2010 @ 12:47 PM
Wow, what a tutorial! Knowing that lots of folks did not want to move to Vista (notably those on XP Pro), you had to think it would be possible to install Magenta on that OS. This is a goldmine, thanks Jason.
By os posted on Saturday, April 24, 2010 @ 3:37 AM
Fatal error: Maximum execution time of 60 seconds exceeded in D:\wamp\www\project\opensource\magento\lib\Zend\Db\Statement\Pdo.php on line 228
By Al Doan posted on Sunday, May 23, 2010 @ 8:45 PM
os, you're on PHP 5.3, you can't use xampp > 1.7.1 or you get those errors, good tutorial though, easy walk through, a few kinks along the way, but all in all very well documented!

By Al Doan posted on Sunday, May 23, 2010 @ 9:18 PM
also, if anyone else runs into this, I had everything setup on localhost and it worked fine but I couldn't login to my magento admin panel (it just looped to the login screen without any kind of error or anything). The problem is magento can't set a cookie with localhost, so I had to set a in my hosts file and then set that in the base url, then I logged in fine. FYI
By Chris posted on Wednesday, June 9, 2010 @ 12:15 AM
i had the same problem as os

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\inthepink\lib\Varien\Db\Adapter\Pdo\Mysql.php on line 276

so i need to install an older version of xampp?
By AMY posted on Friday, June 11, 2010 @ 12:01 PM
I have installed it accordingly as above into my Windows 7. When i clicked on It is showing me phpinfo() page. What is the reason?
By Meda posted on Thursday, July 8, 2010 @ 2:45 PM
To avoid "Fatal error: Maximum execution time of" just set "max_input_time" in your php.ini.
By Phillip posted on Friday, July 30, 2010 @ 2:40 PM
I had everything setup on localhost and it worked fine but I couldn't login to my magento admin panel (it just looped to the login screen without any kind of error or anything). The problem is magento can't set a cookie with localhost
By Susan posted on Friday, August 6, 2010 @ 4:18 AM
i have change "max_input_time" to 180, but there is still error.
anyone can help me??
By Drew posted on Wednesday, August 11, 2010 @ 2:43 PM
RE Magento Looping Admin Login screen Cookie Problem

One common problem with installing Magento on localhost has to do with cookies. The Magento platform uses them, and most browsers won't accept them from the localhost. If left unchanged, you'll get many errors and no error messages.

You have a couple of choices here, you can either create additional entry in your /etc/hosts file (as advised in earlier postings above) and use it to access Magento or you can comment out some of the cookie settings. (i solved my own problem by commenting out the cookie settings)

To comment out session cookies, you'll need to navigate through your recently copied Magento folders to reach Varien.php. The path is magento/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.

Find the code for setting session cookie parameters. In my copy of the Varien.php file, these started on line 77. Here is the specific code for which you're looking:
view source
2 // set session cookie params
3 session_set_cookie_params(
4 $this->getCookie()->getLifetime(),
5 $this->getCookie()->getPath(),
6 $this->getCookie()->getDomain(),
7 $this->getCookie()->isSecure(),
8 $this->getCookie()->getHttponly()

Comment out the final three lines and be sure to remove the comma after $this->getCookie()->getPath(). You should end up with this:
view source
2 // set session cookie params
3 session_set_cookie_params(
4 $this->getCookie()->getLifetime(),
5 $this->getCookie()->getPath()
6 // $this->getCookie()->getDomain(),
7 // $this->getCookie()->isSecure(),
8 // $this->getCookie()->getHttponly()

you should now be able to log in to the backend
By pavan posted on Sunday, September 12, 2010 @ 5:19 AM
the following did the trick for me .... thanks

Enable URL rewrites:

1. You can do this by remove the "#" hash character in front of the following line:
1. LoadModule rewrite_module modules/
By zrizwan posted on Thursday, September 30, 2010 @ 3:44 AM
I got this error!! What did I do wrong Please help me!

Error in file: "C:\xampp\htdocs\ajstest\app\code\core\Mage\Catalog\sql\catalog_setup\mysql4-upgrade-0.7.39-0.7.40.php" - Unknown error (8192): Function split() is deprecated in C:\xampp\htdocs\ajstest\app\code\core\Mage\Catalog\sql\catalog_setup\mysql4-upgrade-0.7.39-0.7.40.php on line 35
By patco posted on Sunday, December 5, 2010 @ 12:50 PM
To avoid "Fatal error: Maximum execution time of" just set "max_input_time" in your php.ini and also "max_execution_time ". I set them to 600 (10min) for magento installation period and avoided the problem. Used latest xampp version(1.7.3) windows7 64bit and magento
By Portwiz posted on Friday, January 14, 2011 @ 9:59 AM
One common problem with installing Magento on localhost has to do with cookies. The Magento platform uses them, and most browsers won't accept them from the localhost. If left unchanged, you'll get many errors and no error messages. Best regards, Katya, CEO of audio burner
By Alex posted on Sunday, February 13, 2011 @ 7:11 PM
That was huge help for me, Thanks people for this tutorial !!!
By Dave posted on Monday, February 28, 2011 @ 1:56 PM
Great tutorial, i have it working with windows 7 and it went through very well. I copied over my own website to my local machine and also got it working with no problems, but I cant figure out how to upgrade now. Im running magento and just wanted to play with locally. I tried magento connect and while it said it was successful it did not work. I am not sure how i would do it with SSH since it is a local machine. Can anyone point me in the right direction on how to upgrade properly running magento locally? Thanks so much!
By Bryan posted on Thursday, March 17, 2011 @ 5:17 PM
I could not get xampp to work, so used wamp and voila! Use all the same tutorial and place your magento folder (or whatever you name it) into the www folder instead of htdocs. I also placed the sample data sql file into the data base, and the media folder into the media folder (photos and catalog sample).

But, I did not check the use web server (Apache) re-writes. Is there a way to change this after installation, or should I go back and do the install over again.
What effect does the re-writes have?

Also, could you expand on how naming the folder and domain to the same name you are going to use ( helps when you do the move to the hosting server?

Thank you so much for the tutorial.
By Jessie Patterson posted on Tuesday, March 29, 2011 @ 6:32 PM
Thanks for this guide its pretty time consuming but this helped alot.
By Varun Sharma posted on Thursday, June 16, 2011 @ 5:12 PM
Hi Jason, Thanks for lot for writing this guide. I was really lost while installing Magento before I saw this webpage. The step by step process that you have listed down makes Magento installation pretty easy.

Thanks again,
By Tomas Andersson posted on Tuesday, June 21, 2011 @ 2:50 PM
I have Windows xp and i havent tested Magento yeat but this guide gives me help and i will probably test to install Magento.
By Fotoviva posted on Tuesday, June 28, 2011 @ 1:58 PM
I'm building a new site for my art photography and have been toying with magento but it seems incredibly slow to run - is this something everyone finds?
By jeeva posted on Monday, July 11, 2011 @ 12:47 PM
By vivek posted on Tuesday, July 12, 2011 @ 4:43 AM
it really help me a lot , to install magento on window local machine.
By Rap Music Guide posted on Thursday, July 21, 2011 @ 5:43 AM
Magento is such a beast and this installation guide tackled it like it was nothing! If you follow every step just as Jason at JVF Consulting does above, then you will be successful! There is no messing around with this tutorial.
By TL posted on Wednesday, July 27, 2011 @ 3:23 PM
First of all thank you for this information. I am new to this and would like to learn and attempt to create a test ecommerce site, however, when I look for the file as indicated below I can not located it. So I'm already stuck. I did download XAMMP 1.6.6a for this attempt. What am I missing?

Navigate out to your local my.cnf file found at: C:\apachefriends\xampp\mysql\bin\my.cnf
By Dindo Barriga posted on Wednesday, February 8, 2012 @ 8:41 AM
After several attempts I was finally able to set-up the specific version of Magento both to my lap top and to my website.

Thank you very much for the detailed instructions along with the screenshots.
By darrenny26 posted on Wednesday, February 8, 2012 @ 11:34 PM
thank you so much for this! I've tried to install magento for several days now and I couldn't get it done the way I wanted. I really need to get magento working for a easter project for school so I was already sweating. But this helped me out! Thanks
By Richard posted on Wednesday, March 21, 2012 @ 10:07 AM
Thanks for these tips. I find that my Magento site works much faster when running locally than on a live site, so I'm guessing I need to get better hosting!
By Nigel posted on Sunday, April 8, 2012 @ 4:42 PM
ehckk, that is going to be a nightmare really. I would suggest running Ubuntu in Vmware and actually set up server for this. Its pretty simple if you understand a lamp environment and how to set up so you can let folks see it if need be.

hope that helps,
By smrtgurl kritz posted on Saturday, May 5, 2012 @ 2:46 AM
Nice and easy step by step guide to install magneto on windows XP. Thank You!
By William posted on Wednesday, July 25, 2012 @ 12:29 PM
Well, I spent 2 hours reading the article and following all the instructions. To be honest, not everything was clear to me, much is yet to be understood and realized. But without this guide I don't think that i could do it on my own. Many thanks to you and your team!
By Alvin posted on Saturday, August 4, 2012 @ 3:32 AM
Great tutorial.... worked for me! My local development is done, may i know how to migrated to web hosting?
uploaded my c:\xampp file into webhosting folder(public_html)? and recreate my db in cpanel?
By KS Singh posted on Friday, August 10, 2012 @ 12:36 PM
You're life saver. At last I got rid of Maximum execution time. Thanks a lot.
By Jess posted on Wednesday, October 3, 2012 @ 10:59 AM
Wow its interesting , very clearly explained about the steps to install magento. I have 2 computer with me, 1 with windows XP and other with Windows7 operating system. Can you tell how to install magento in windows7 operating system.
By Kees posted on Thursday, October 18, 2012 @ 7:53 AM
Thanks for the information. This helped me install magento for a friend. I'm also interested in some info about a windows 7 magento install.
By Clint posted on Friday, November 2, 2012 @ 12:41 PM
we are currently trying to configure this with chargify
By Lenny posted on Tuesday, April 16, 2013 @ 7:48 PM
step by step easy guide that helped me in my project thanks
By quang hunghim posted on Wednesday, May 28, 2014 @ 8:49 AM
Thanks for this tutorial, I've successfully installed Magento Locally on Window XP. Could you also write a tutorial on Window7?
By Andy posted on Tuesday, August 5, 2014 @ 11:44 AM
Works perfect for me, but now i need to run multiple websites within one installation of Magento on my local pc. Is this possible using the same methods here?

Many Thanks
By Lance posted on Wednesday, September 3, 2014 @ 10:13 AM
Thanks for the great article - very helpful for a beginner like myself!

I downloaded the latest version of XAMPP (1.8.3) targeting php5.5, but ran into compatibility issues with Magento (deprecated functionality: preg_replace()) when trying to create websites and stores. I guess I should have read the Magento documentation a bit more carefully! Everything working fine now after installing xampp v1.8.2 that targets php5.4.

If you are using a custom port for your Magento instance, remember to update the httpd.conf file ServerName and Listen settings accordingly. In my case I had to change from
"Listen 80" to "Listen 81"
"ServerName" to "ServerName"
By Nick posted on Monday, September 15, 2014 @ 9:22 PM
Hi we successfully got magento working nicely locally, but when we added a new theme and replaced files in the setup locally, it ran the magento wizard / download again... what is going on there? Is it cookies?
RSS Facebook Twitter LinkedIn Google Plus Pinterest