Setup Magento on IIS

May 17, 2010

Step 1: Create a new folder called magento under C:\Inetpub\wwwroot, then copy and put all the files into that folder.

Step 2: Right-click on the newly created magento folder and click on Properties. Then, click on the Security tab. Give full permission to this folder. See below.

Step 3: Please prepare the database now using the .sql file. If you need to change any database configuration settings, please open the C:\Inetpub\wwwroot\magento\app\etc\local.xml file for editing.

Step 4: Using any database editor, please open the database table core_config_data and change two path values

path = web/secure/base_url

value =


path = web/secure/base_url

value =

In both cases, the value should be changed.

Note: You should delete all the files and folders under C:\Inetpub\wwwroot\ magento \var\cache in order to prevent unwanted cache problems.  See below.

Step 5: This is the most important step for running a Magento project under IIS.

Please download ISAPI_Rewrite3_0073_Lite.msi from

See below.

Install this software.

IIS will be automatically restarted after installation.

Verify if the installation was successful by opening up the IIS Manager. Right-click on Web Sites and select Properties. You should now have a new tab if installation was successful. See the screenshot below for reference.

ISAPI Rewrite filter has been successfully installed, but we are not done yet. Your httpd.conf file should be empty, so we need to put some rewrite rules in it. The following lines are taken from the .htaccess file in the root of your Magento installation (that is, the website’s root folder), and put into the httpd.conf file.

So click on Edit, and then you have got a chance to add the following code.

RewriteEngine on

RewriteBase /magento/

RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php [L]

See the screenshot below for reference.

Now press Apply (top-left corner of the editor).

You’re done configuring the ISAPI Rewrite filter and can now run the Magento project.