Introduction
Joomla is an open-source content management system (CMS), which enables you to build Web sites and powerful online applications. Joomla is used all over the world to power Web sites of all shapes and sizes. For example:
- Corporate Web sites or portals
- Corporate intranets and extranets
- Online magazines, newspapers, and publications
- E-commerce and online reservations
- Government applications
- Small business Web sites
- Non-profit and organizational Web sites
- Community-based portals
- School and church Web sites
- Personal or family homepages
This article describes how to install and configure Joomla to run on Windows with IIS 6.0 and IIS 7.0. The article assumes that you have completed the setup and configuration steps necessary for running PHP applications on IIS 6.0 or IIS 7.0.
The following instructions have been tested and found to work on the following configuration:
- Windows Server 2008 Web Edition
- IIS 7.0
- PHP 5.2.8
- MySQL 5.0
- Joomla 1.5.8.
Notes on PHP setup
Joomla does not require many modifications beyond the default configuration provided by PHP. From the base configuration file provided by PHP, you only need to modify the following lines in your php.ini configuration file to get Joomla working:
- Define 'extension_dir' as 'c:\php\ext' (i.e., the location of your php extensions directory)
- Uncomment 'extension=php_mysql.dll' in the extensions list to enable MySQL support
Prerequisites
In order for Joomla to work correctly with IIS 7.0 it is necessary to install an update for IIS FastCGI module for IIS 7.0. More information about the update is available here.
Download and unZip Joomla
Find the the latest release of Joomla at http://www.joomla.org. The instructions in this document are based on version 1.5.8, but future versions are likely to be very similar as far as installation is concerned. After downloading the zip package, extract its contents to C:\Inetpub\wwwroot\Joomla or another directory of your choosing.
Grant write permissions on configuration file
Joomla uses configuration file called configuration.php in order to store key configuration settings. Before running the installer you need to create this file to give the web server write privileges to the new file. Joomla's installer will modify the configuration.php file as needed with the details you provide during the installation process.
After creating the new file you can assign write permissions to it with the command (from the installation directory):
C:\inetpub\wwwroot\Joomla>icacls configuration.php /grant BUILTIN\IIS_IUSRS:(M)
Grant write permissions to tmp folder
Joomla uses the tmp folder to store temporary files. Because of that it needs to be able to write and modify files in this folder. To enable that, grant modify permissions to this folder:
C:\inetpub\wwwroot\Joomla>icacls tmp /grant BUILTIN\IIS_IUSRS:(OI)(CI)(M)
Set up the database
Before starting the installation procedure for Joomla, create a database on your server. Also create a user and grant this user db ownership permission to the database. Follow the instructions in the Setting Up a Database for a PHP Application on IIS article for a MySQL database. This walkthrough uses the following database information:
- Database Name: 'Joomla'
- Database User: 'Joomla'
- Account Password: 'Joomla'
Run the installation script
To start the installation, open web browser and request http://localhost/drupal/. This will bring up the first page of the installation script:

Choose the language and then click "Next":

Verify that all pre-installation checks are successful and then click "Next":

On this page enter the following:
- Host Name: localhost
- Username: joomla
- Password: joomla
- Database: joomla
Click "Next":

Choose not to enable FTP file system layer and then click "Next" again:

Specify the site name and the administrator password. Click "Next" to finish the installation:

Delete the C:\inetpub\wwwroot\joomla\installation folder as per instructions. After the folder has been deleted you will be able to browse Joomla site:

Enabling Search Engine Friendly URLs
By default Joomla uses query string parameters for all the links URLs it generates for your web site. This behavior can be changed by enabling what is called "Search Engine Friendly URLs" in Joomla. However, this feature relies on the URL rewriting functionality to be available on the web server. IIS 6.0 does not have URL rewriting capabilities, so you could use one of the third party URL rewriting products, such as ISAPI_Rewrite or Ionics ISAPI Rewrite Filter. IIS 7.0 has URL rewriting support, which can be enabled by installing Microsoft URL Rewrite Module for IIS 7.0. The following instructions describe how URL Rewrite Module for IIS 7.0 can be used to enable Clean URLs in Joomla.
First, you will need to download and install Microsoft URL Rewrite Module. Once it has been installed, create and open a web.config file located in C:\inetpub\wwwroot\Joomla folder. Paste the following XML code into this file.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Security Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAny">
<add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="(\<|%3C).*script.*(\>|%3E)" />
<add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
<add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
</conditions>
<action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>
<rule name="SEO Rule">
<match url="(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
<add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />
<add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Save the web.config file and then open web browser and logon to the Joomla administrator console at http://localhost/joomla/administrator/ . Once logged on, go to Site --> Global Configuration menu configure SEO settings as below:

- Search Engine Friendly URLs - Yes
- Use Apache mod_rewrite - Yes
- Add suffix to URLs - No
Save configuration by clicking on "Apply" and then browse to http://localhost/joomla/ . You will see that now all links in Joomla pages have URLs without query string parameters and if you click on any of these links the server will return correct response:

Getting More Information
To discuss the FastCGI and URL Rewrite Module specific questions, or file bug reports, please use these forums:
To get more information regarding running various PHP applications on IIS, refer to:
Comments