Installing Magento on Localhost

This is tested on both XAMPP ( and WAMP (

Note: on XAMPP the apache directory is just apache while on WAMP the directory is apache2 (please change the instructions below accordingly)

Note: check version of PHP, which you will use. Magento not work with PHP 5.3 (for XAMPP, use XAMPP for Windows Version 1.7.1 )

1) Download and Install (place magento files as references in installation instructions)

2) Setup Database using phpmyadmin (goto: http://localhost , there will be a link on the left to goto phpmyadmin)

3) Edit apache/conf/httpd.conf change line:

  1. #LoadModule rewrite_module modules/


  1. LoadModule rewrite_module modules/

(just remove the # )

4) Edit apache/bin/php.ini and php/php.ini (same changes on both files – note, as of XAMPP 1.7.1, you will only have to change php/php.ini) change lines (the first change is not necessary on xampp):

  1. ;extension=php_mcrypt.dll


  1. extension=php_mcrypt.dll

and changes lines:

  1. ;extension=php_curl.dll


  1. extension=php_curl.dll

(just remove the ; )

4a) On WAMP you must also change the following line in apache2/bin/php.ini and php/php.ini changes lines:

  1. ;extension=php_pdo_mysql.dll


  1. extension=php_pdo_mysql.dll

(just remove the ; )

In addition to php_pdo_mysql.dll, you may also need to make sure you are loading:

  1. extension=php_pdo.dll

5) There is a bug in Windows’ php_pdo_mysql implementation. It is possibly related to this bug documented here: and here: . Workarounds could be:

Here is another link to the libmysql.dll file: Note above file is linked by a community member, FrenchToast and the current download above is hosted by Xavier ETCHEBER. While there has been no problems with this file it has not been fully verified//

6) Restart all servers

7) Goto: http://localhost/magento/install (replace the above “magento” with where your installation was extracted to)

8) On page 2 “Configuration” change database as needed and change Secure Connection to: (XAMPP actually supports SSL over port 443 – so this step is not needed if you want to test SSL)

    Secure Host: localhost (could be different)
    Secure Base Path: /magento/ (also could be different)
    Secure Protocol: http
    Secure Port: 80

9) Continue with install, all should be good!

NOTE If you can’t login to the administration panel after installation, that’s because there’s a cookie problem. Add these lines:


    C:/Windows/System32/drivers/etc/hosts (edit this file in notepad)

Then go to<folder>

Known Issues
Magento was developed on Linux and as such, it is most tested on this platform. Here are some known issues that may result from the use of other operating systems.

   1. Under Windows, image uploads may not work at this time:

here's a fix (from
login to backend using FireFox, you will resolve this issue.
go to System -> Configuration -> Catalog, then under Image Configuration

Category upload url - /media/catalog/category/
Product upload url - /media/catalog/product/

rename to:

Category upload url - /RootFolderName/media/catalog/category/
Product upload url - /RootFolderName/media/catalog/product/ 

RootFolderName matches your folder you've installed magento in

my installation is located:C:/wamp/www/magento
so my rootfoldername is magento!!
Category upload url - /magento/media/catalog/category/
Product upload url - /magento/media/catalog/product/ 

image upload should work know and you can start working offline

1 thoughts on “Installing Magento on Localhost

Leave a Reply