Business Web Hosting since 2005

How to install Magento on a PC with XAMPP

After wasting hours yesterday trying to get Magento working on XAMPP, I finally hit a winning combination. So here’s the summary of how to get a local copy of Magento running on a PC. Tested on Windows Vista (32bit) with XAMPP v1.7.1 and Magento

Quick tips

  • Use XAMPP 1.7.1 – the version is important! v1.6.8 may also work.
  • Enable curl in php.ini
  • Install from http://127.0.01 and NOT localhost


To run a PHP/MySQL site on a PC you need a Linux distro, giving you an Apache server on your PC. We use XAMPP – it’s reliable, well-supported and easy to install. When you install XAMPP, the version is VERY important:
XAMPP 1.7.2 uses PHP5.3 which the curent version of Magento can’t handle
XAMPP 1.7.1 is the version I’m using – recommended
XAMPP 1.7.0 does NOT work with Magento – Apache will crash during Magento install
XAMPP 1.6.8 has been reported to work with Magento but I can’t verify this

So if you’re starting from scratch, use v1.7.1. If you have an existing install, check your version and upgrade if necessary. XAMPP project: Older versions can be downloaded from SourceForge: Choose the XAMPP Windows versions.


By default curl is disabled in XAMPP. Download /apachefriends/xampp/php/php.ini and find the curl extension. Uncomment it by removing the semi-colon in front of it:

Installing Magento

Download the latest version of Magento:
Unzip the folder into your /htdocs/ folder. By default this will unzip into a /magento/ folder.
Create a blank database via your PHPMyAdmin (http://localhost/phpmyadmin)
Go to: and follow the install procedure.

Note that I’m saying “”. If you use “localhost” cookies won’t work (except in Opera), you won’t be able to log into admin and you will have URL warnings. Localhost isn’t recognised as valid domain name by Magento. Using “” gets round that problem as it contains dots.

You’re done & ready to develop your Magento shop offline!


28 Responses to How to install Magento on a PC with XAMPP

  1. m0sh3g October 4, 2009 at 3:16 am #

    “Localhost isn’t recognised as valid domain name by Magento.”

    This is incorrect, the Magento doesn’t have any preference for localhost or not, it’s a browser issue, as you’ve mentioned that it works with Opera.

    As a side note, I’ve found that WAMP presents less problems with configuring and crashing.

  2. Rhea October 4, 2009 at 1:27 pm #

    I’m sorry, but it is yourself that is in error. The latest versions of Magento include a check for a FQDN (Fully Qualified Domain Name), which must have one or more periods (dots) in the name e.g.

    ‘localhost’ contains no periods (dots) whilst ‘’ does, and this is why you must use and not localhost.

    Older versions of Magento, which don’t have the FQDN check, will work with ‘localhost’.


  3. Mark October 9, 2009 at 4:35 am #

    setup a virtual host. apache/conf/extra/httpd-vhosts

    Can have multiple Magentos installed all running of whatever domain you want. Just add the appropriate lines in your hosts file too!!

  4. avon November 14, 2009 at 10:11 pm #

    i recieved a massage – “Fatal error: Method Varien_Object::__tostring() cannot take arguments in C:\xampp\htdocs\magento\lib\Varien\Object.php on line 488″
    how can i resolve that and move on with the installation?
    thank you

  5. Edith November 16, 2009 at 5:02 pm #

    Hi Avon – are you trying to install Magento on PHP5.3? The current version is not compatible with PHP5.3. If your on a local XAMPP install, I’d recommend to roll back to PHP 5.2.9.

    The Magento forum has a lot of threads on this error, but my concern would be that even if you fix this one, you’ll run into further PHP5.3 problems. Magento forum links:

  6. j2ibeo November 25, 2009 at 8:34 am #

    I got the same error with Edith and now downloading a lower version of PHP ( 5.2.11) . Is this version working on magento?


  7. Edith November 25, 2009 at 9:24 am #

    Hi j2beo – As far as I know, it’s only 5.3+ that cause problems. However on the Magento forum there are workarounds for 5.3+. You do need to modify core code, but it is possible to get it to work. Search for “Magento” and “PHP5.3″ on Google / Magento forum.

  8. Joe January 4, 2010 at 10:02 pm #

    FYI. This totally works. The author is 100% correct. Now all I need is a step-by-step to repair the hole in the wall that I made with my head.

  9. Rhea January 4, 2010 at 10:56 pm #

    Yes, those holes in the wall are a real problem. Made a few of those myself over the years!

  10. Jonathon January 31, 2010 at 12:38 am #

    Running XAMPP 1.7.1 with Magento

    All was well setting up the site until I tried adding new products. Apache crashes… Any thoughts?

  11. Rhea January 31, 2010 at 1:55 pm #

    Edit your php.ini as follows, then completely shut down Apache and restart:

    1. file uploads limit should be set to 128 Mbs
    2. max execution time should be set to 90 seconds


    3. make sure you’re not running PHP 5.3. If you are then roll back XAMPP to the laest 5.2+ version, which can be found at Source Forge

    Report back if they don’t solve the problem


  12. Srinivas Tamada February 2, 2010 at 5:19 am #

    Hi Rhea,

    I modified php.ini but while clicking the Configuration page button ‘continue’ the apache http server has stopped working message is coming.

  13. hidalcri February 7, 2010 at 9:03 am #

    You are awesome! I think that I bang my head so hard that it trans-passed to the neighbor apartment!! Hours trying and trying. Thank you so much!!!

    Now, how can you configure magento to work via the FTP server of your site??

    Thanks again so much!!

  14. Best Content Management System February 19, 2010 at 11:02 pm #

    Thanks for the tips, they really helpes! I was able to figure out how to install Magento locally onto my computer running Windows XP. Here is a step by step guide on how to install Magento with no errors!

  15. Ed Hardy March 11, 2010 at 10:42 am #

    I modified php.ini but while clicking the Configuration page button ‘continue’ the apache http server has stopped working message is coming.

  16. Edith March 11, 2010 at 11:53 am #

    Hi Ed – which version of XAMPP and what version of Magento are you using? Edith

  17. Alexander May 15, 2010 at 1:53 pm #

    Hi anytime I get to the point where I need to fill in my host name, database name and all and click continue, it shuts down my apache server. I’m trying to install using xampp version 1.70, what could be the cause?

  18. Edith May 17, 2010 at 9:34 am #

    Hi Alexander – as stated in my blog: XAMPP 1.7.0 does NOT work with Magento – Apache will crash during Magento install. You need to upgrade your XAMPP install to at least 1.7.1.

  19. sarah July 3, 2010 at 2:52 am #

    I am trying to install magento on xampp 1.7.2 — i am also stuck in the configuration page. I’ve recreated the database, but still no avail, any thoughts on this?

  20. Rhea July 3, 2010 at 10:22 am #

    The very first paragraph advises that you use XAMPP 1.7.1 (and not 1.7.2). I recommend you go with that advice.


  21. priya July 17, 2010 at 12:24 pm #

    i am using windows vista . i want to install magento in my local computer.But when i install magento an error occurs “PHP extension “curl” must be loaded.” .how can i solve this problem…

  22. Rhea July 17, 2010 at 12:55 pm #

    When you install XAMPP it does not come with the cURL add-on as standard, but this is available from the same page as XAMPP. You need to download that and install it.

  23. July 23, 2010 at 6:04 am #

    I think you may alter the Varien.php in \app\code\core\Mage\Core\Model\Session\Abstract\ to solve the problem what about cookies.
    Change if (isset($cookieParams[‘domain’]) to if (isset($cookieParams[‘domain’]) && !in_array(“″, self::getValidatorData())) {

  24. Mage April 3, 2012 at 12:22 pm #

    This is a great tutorial for beginners like me. However, you should note that if you enable anything in your php.ini file during active Apache server, you will need to restart it for changes to take effect. Also, I have encountered a “Database connection error” during installation issue, which I am trying to figure out now.

  25. bindu October 23, 2012 at 5:46 am #

    I am installing a fresh magento in my Windows XP computer. I have Xampp installed. While installing magento, I had a problem at the configuration step where I had to fill database host, username, password etc. When I click continue after filling the required fields, the installation process doesn’t move forward. I am redirected to the same page.


  1. How to install Magento on a PC with XAMPP » - May 9, 2011

    […] source […]

  2. Debuging MAGENTO locally | DYERPROJECTS - September 10, 2011

    […] From: […]

  3. Learn how to customize your Magento theme - August 24, 2012

    […] To create a local server, we can use XAMP (Windows) or MAMP (Macintosh). We can find online detailed instructions on how to install Magento on a local server, both for XAMP and MAMP. […]

Leave a Reply



Google Plus

Follow Me on Pinterest