Community Documentation

Windows Download Instructions

Last updated March 10, 2012. Created by chicagomom on August 24, 2009.
Edited by screenack, dbdot, annahlauren, uNeedStuff. Log in to edit this page.

Prerequisites

  • Unzip program for processing .tar.gz files. .tar.gz is a format Windows doesn't understand by default. This tutorial assumes you've downloaded and installed the freely available utility 7-Zip to allow you to extract .tar.gz files. A number of other file compression utilities are also available.

Download Drupal

  1. At the project download page, find the version you want to download. In this case, select the first Drupal 7 version under the section 'Official Releases.' Click on 'Download.' Save the file (don't open it with another program.)
  2. Uncompress the file. Right-click on the .tar.gz file and select 7-Zip >> Extract here. Right-click on the .tar file and repeat. You will now see the final Drupal folder. Drag and drop the folder where you need it to be.

    Note: If you extract the files into a folder other than your web site's folder, copy the contents of the Drupal folder into the appropriate web folder, rather than cutting/pasting them. (This will ensure the files will inherit the appropriate permissions for the web server.)

    Note:If you are using Apache instead of IIS skip the next two steps.

  3. Create the files folder. In the sites/default folder, create a folder called files and grant modify permissions for it to IIS_WPG (IIS6) or IIS_IUSRS (IIS7).
  4. IIS7: Create/modify web.config file. Drupal distributions come with .htaccess files for *nix use; IIS7 users should convert this file to a web.config file for their site. If you have used the IIS Manager to create a new site, a basic web.config file will exist in your site's root directory. Edit the file to look like this example:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
      <!-- Don't show directory listings for URLs which map to a directory. -->
        <directoryBrowse enabled="false" />

        <!--
           Caching configuration was not delegated by default. Some hosters may not delegate the caching
           configuration to site owners by default and that may cause errors when users install. Uncomment
           this if you want to and are allowed to enable caching
         -->
        <!--
        <caching>
          <profiles>
            <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
            <add extension=".html" policy="CacheForTimePeriod" kernelCachePolicy="CacheForTimePeriod" duration="14:00:00" />
          </profiles>
        </caching>
         -->

        <rewrite>
          <rules>
            <!-- rule name="postinst-redirect" stopProcessing="true">
              <match url=".*" />
              <action type="Rewrite" url="postinst.php"/>
            </rule -->

            <rule name="Protect files and directories from prying eyes" stopProcessing="true">
              <match url="\.(engine|inc|info|install|module|profile|test|po|sh|.*sql|postinst.1|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$" />
              <action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." />
            </rule>
            <rule name="Force simple error message for requests for non-existent favicon.ico" stopProcessing="true">
              <match url="favicon\.ico" />
              <action type="CustomResponse" statusCode="404" subStatusCode="1" statusReason="File Not Found" statusDescription="The requested file favicon.ico was not found" />
            </rule>
                    <!-- To redirect all users to access the site WITH the 'www.' prefix,
                    http://example.com/... will be redirected to http://www.example.com/...)
                    adapt and uncomment the following:   -->
                    <!--
            <rule name="Redirect to add www" stopProcessing="true">
              <match url="^(.*)$" ignoreCase="false" />
              <conditions>
                <add input="{HTTP_HOST}" pattern="^example\.com$" />
              </conditions>
              <action type="Redirect" redirectType="Permanent" url="http://www.example.com/{R:1}" />
            </rule>
                    -->
                    <!-- To redirect all users to access the site WITHOUT the 'www.' prefix,
                    http://www.example.com/... will be redirected to http://example.com/...)
                    adapt and uncomment the following:   -->
                    <!--
            <rule name="Redirect to remove www" stopProcessing="true">
              <match url="^(.*)$" ignoreCase="false" />
              <conditions>
                <add input="{HTTP_HOST}" pattern="^www\.example\.com$" />
              </conditions>
              <action type="Redirect" redirectType="Permanent" url="http://example.com/{R:1}" />
            </rule>
                    -->
            <!-- Rewrite URLs of the form 'x' to the form 'index.php?q=x'. -->
            <rule name="Short URLS" stopProcessing="true">
              <match url="^(.*)$" ignoreCase="false" />
              <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
              </conditions>
              <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
            </rule>
          </rules>
        </rewrite>

        <!-- httpErrors>
          <remove statusCode="404" subStatusCode="-1" />
          <error statusCode="404" prefixLanguageFilePath="" path="/index.php" responseMode="ExecuteURL" />
        </httpErrors -->

        <defaultDocument>
         <!-- Set the default document -->
          <files>
            <remove value="index.php" />
            <add value="index.php" />
          </files>
        </defaultDocument>
      </system.webServer>
    </configuration>

Comments

Getting error upgrading from V6

"The configuration section 'rewrite' cannot be read because it is missing a section declaration "

I've reverted back to V6 and all is good, but following instructions and going to V7 on Windows causes this to happen every time. I've checked the web.config file and it matches this..

I received the same error. I

I received the same error. I solved it by installing the "URL Rewrite Module 2.0":

http://www.iis.net/download/URLRewrite

New to installing Drupal on Windows: Help!

I am installing Drupal on Windows ( I already have an Apache HTTP Server, MySQL, PHP, etc., all working just fine on my localhost) and was about to tackle this step 4:
"IIS7: Create/modify web.config file. Drupal distributions come with .htaccess files for *nix use; IIS7 users should convert this file to a web.config file for their site. If you have used the IIS Manager to create a new site, a basic web.config file will exist in your site's root directory. Edit the file to look like this example:"

But based on the few comments preceding mine, I am skeptical about making all the conversions to my already present web.config file to get it to match "this example". Also, I have not knowingly "used the IIS Manager to create a new site", and don't even know what that means. My unzip included a web.config file, it will indeed require editing to match the example, but can someone tell me if things will then work, whatever those "things" turn out to be.

Guess I'll read on for now. I do wonder why my already existing web.config file is not really closely alike the example.

richos

web.config files are used by

web.config files are used by IIS web server software, not Apache, which uses .htaccess files. If you are running Apache, you don't need a web.config file, these rules will be contained in your server's .htaccess file.

Better web.config (i think anyway)

The web.config above has alot of content i dont think is needed. i will post what i use below and best of all, it doesnt need editing. The redirect is wildcard (it will automatically correctly redirect for your url to add www.). its also worth noting that this one adds the MP4 extention as an exception as IIS blocks this by default, so if anyone is having issues playing MP4 files on thier drupal site, this might help.

If you wish to redirect to remove www, you can edit accordingly. Oh and clean URLS and path auto work with this, something that i have seen other config files struggle to support.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>

     <directoryBrowse enabled="false" />
<staticContent>
            <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
            <mimeMap fileExtension=".m4v" mimeType="video/m4v" />
     </staticContent>

     <rewrite>
      <rules>
         <rule name="Protect files and directories from prying eyes" stopProcessing="true">
            <match url=".(engine|inc|info|install|module|test|po|sh|sql|postinst.1|theme|tpl(.php)?|xtmpl|svn-base)$|^(code-style.pl|Entries.|Repository|Root|Tag|Template|all-wcprops|entries|format)$" />
            <action type="CustomResponse" statusCode="403" subStatusCode="0" statusReason="Forbidden" statusDescription="Access is forbidden." />
          </rule>


        <rule name="Redirect to add www" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="false" />
          <conditions>
            <add input="{HTTP_HOST}" negate= "true" pattern="^www\.(.+)$" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="http://www.{HTTP_HOST}/{R:1}" appendQueryString="true" />
        </rule>

          <rule name="Short URLS" stopProcessing="true">
             <match url="^(.*)$" ignoreCase="false" />
             <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
              <add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
             </conditions>
             <action type="Rewrite" url="index.php?q={R:1}" appendQueryString="true" />
          </rule>
      </rules>
     </rewrite>

  </system.webServer>
</configuration>

replace your web.config with above, and you should be good to go.

-NOTE- if your site is installed on a subdomain (e.g. yoursite.domain.com) comment out the redirect or it will break.

feel free to pull this appart :P

edit was to code post, i posted the wrong webconfig origonally.. oops

RTFM!
For further support or projects contact me.
Issue solved? Add [Solved] to the title

Error with web.config

When I edit a file web.config as shown here, I get an error 500.
Also, in the control panel IIS7, I can not edit the option "Default Document" - comes out this error:

"There was en error while performing this operation.
Details:
Filename: \\?\С:inetpub\new\web.config"

If I change the file web.config to the original - that everything is OK.
what could be wrong?

there might be something

there might be something specific in it...

i posted this a while ago, and I haven't been using IIS for nearly a year now.. I think your best bet here would be to use the original, and take the bits out of my web.config that you need :) (the most useful bit is the wildcard redirect). I will post a new version when I get a chance to play with it, but for now use the original.

Sorry about that

RTFM!
For further support or projects contact me.
Issue solved? Add [Solved] to the title