Deprecated: Use a Docker-based solution such as DDEV or Lando instead.

PS! You might want to read Windows-Specific Guidelines - Install Drupal On Home Computer (Local) first.

Quickstart Installation

Notice: Quickstart should only be used to play with Drupal. To properly deploy Drupal on Windows scroll down to Advanced Setup.

In this section you will learn how to set up a local test site on your Windows PC. You need to do two things on your computer:

  1. Install the software that Drupal needs in order to run
  2. Install Drupal itself

You can use an installer that includes Drupal, the most popular being the Microsoft web installer.

Microsoft web installer/platform

The quickest and easiest way to install Drupal on a Windows platform is to use the Microsoft Web Platform Installer as described in detail on the drupal.org page: Install Drupal 7 on Windows Server 2008 R2 with Microsoft Web Platform Installer.

From your Windows 2008 Server, simply navigate to the Microsoft WebPlatform Installer and click the Download button. to begin the process.

Note that the Drupal 7 version is actually Acquia Drupal, not a standard Drupal distribution. Acquia Drupal includes 30 very popular modules for building big sites. Acquia is only one of over 500 available Drupal distributions.

  1. Download the Web Platform Installer, the front end for downloading and installing various other software components.
  2. Click on the Web Platform tab to view the Frameworks and Runtime subsection. Check the box next to PHP.
  3. Under the Web Applications tab on the left, select Acquia Drupal. Click the Install button.
  4. You will see a screen revealing everything that’s about to be installed. The Installer will grab any necessary component for you if it detects that one is missing from your selection, such as MySQL.
  5. You will also see the Installation confirmation screen. Review the license terms of all the software components and click I Accept.
  6. If you are installing MySQL, you will be prompted to enter a password for your root user. If MySQL was already installed, you will be prompted to enter your password to allow the Web PI to create your applications’ databases.
  7. If prompted, restart your machine.
  8. When the downloads and installations are complete, create your databases and database users for Drupal by filling in the form fields, which will save you time by not requiring you to update your databases and edit your configuration files manually.
  9. Click through to the next screen to view a summary of what has been installed. Under the Drupal application will be a Launch link that will open your default web browser to the installation page (install.php for Drupal). From there you can launch Drupal.

Advanced Installation

Web Server

Drupal can be used with Microsoft Internet information Services (IIS) or with Apache/NGINX.

Warning:The only production ready web server for Windows is IIS from Microsoft. Both Apache and Nginx can be used for development purposes and might be able to handle brochureware, but are NOT recommended for production usage

Nginx on Windows

There are several resources that are available to you to get Drupal up and running on IIS. A search on the Drupal.org forums will usually pull up quite a number of resources. Here are a few other resources to help you get started:

A complete and detailed Installing Drupal on Windows guide for production ready setups Installing Drupal On Windows and SQL Server

A free training series discussing deployment techniques including Drush on Windows:
PHP at Scale on the Microsoft Platform

Installing Drupal on IIS7 and Vista

Drupal Install on Windows Server 2008 SP1 and IIS7

Videos

Here are a few resources on how to install Drupal on Windows Apache/NGINX:

Installing Apache (with PHP) on Windows XP (top of the page)

Installing Apache (with PHP) on Windows Vista (top of the page)

PHP

Drupal is written in the PHP scripting language. For support on how to install and use PHP on Microsoft’s IIS server, visit:

Installing Apache (with PHP) on Windows XP (bottom of the page)

Installing Apache (with PHP) on Windows Vista (bottom of the page)

There are some know issues on IIS 7.5 and below regarding the use of UTF-8 characters in the url. Make sure to read the documentation from Microsoft to fix this.

Databases

Drupal 7 supports the MS database Microsoft SQL Server, see below. For Drupal 6 you'll want to use MySQL:

Installing MySQL on Windows

  1. MySQL - how to install Drupal on MySQL.
  2. Another blurb after - If you still can’t install, another way of getting Drupal up and running on Windows is to use the WAMP platform.

Cron

  • Make a short php script that does a wget of your sites cron file
  • Use the windows task scheduler to run it regularly

Temp, Private, and Public Files

  • Make sure the file setting point to the windows temp directory and that IIS has write access to it. /tmp in unix is not the default temp directory on windows

WinCache

To run Drupal on Windows with reasonable performance you should use the Wincache PHP extension and the Drupal Wincache integration Module:

Xamp

If you want a quick set of instructions to follow, go to Simple install of Drupal on XAMPP. XAMPP from Apache Friends is the easiest way to get everything (Apache, PHP and MariaDB) on a Windows machine (XP and Vista). It is installed in a few minutes and you can start developing right away.

  1. Download XAMPP from Apache Friends at www.apachefriends.org/en/xampwindows.html.
  2. Extract the XAMPP files to a drive by double-clicking the XAMPP self-extracting zip archive. In the Extract to:box, type C:\ (or click the button on the right to select your C:\ drive). Click the Extract button.
  3. Once the files are extracted, open the extracted folder C:\xampp and run setup_xampp.bat.
  4. Double-click the xampp_control.exe to open the XAMPP control panel.
  5. Click the Start buttons next to both Apache and MariaDB.
  6. Test your XAMPP installation by opening the web browser and typing http://localhost or http://127.0.0.1 in the address box.
  7. Run XAMPP services (Apache or Drupal. Once the XAMPP page appears, go to the language section on the lefthand side under Sprachen and select English.
  8. Go to Tools on the lefthand side and click on phpMyAdmin. Create a new database called Drupal: under MySQL Connection Collation, select UTF8 unicode. Under Create New Database, type in Drupal.
  9. Once you get the message “database drupal has been created”, close phpMyAdmin.
  10. Set your password for MariaDB for the “root” user. Open your web browser, go to http://localhost/security. Scroll down and select http://localhost/security/xamppsecurity.php. Once the security consoles opens, type in your password and click the Password Changingbutton.
  11. Restart MariaDB in the control panel by clicking the Stop button next to MariaDB, then the Start button again.
  12. Extract Drupal files to the C:\xampp\htdocs folder. It would be easier for future use to rename the folder “Drupal”. Open the “Drupal” folder and copy the default.settings.php file to the same folder. Rename it settings.php. Open settings.php with Wordpad and type in $db_url = ‘mysql://root:admin@localhost.drupal’;. Then scroll down and enter $base_url = ‘http://localhost/drupal’;.
  13. Install your Drupal site and configure.

FusionLeaf Stack

FusionLeaf Stack is a preconfigured web stack which allows you to run Drupal very quickly without have to install or configure any additional software. FusionLeaf Stack makes it very easy to test Drupal without wasting any time trying to follow complicated tutorials. It includes Nginx, MySQL, PHP, and Memcached - Full instructions can be found here.

Note: Be sure to change the default MySQL password, prior to setting up Drupal, to help prevent unauthorized access if your website will be public facing.

  1. Download the latest version of FusionLeaf Stack.
  2. Run FusionLeaf Studio.exe
  3. Click Automation -> FusionLeaf -> Remove CMS from Localhost folder -> Click OK
  4. Click Open Folder -> Webroot
  5. Double click on the localhost folder
  6. Delete index.php
  7. Download and extract Drupal files to the localhost folder
  8. Click Start to start Nginx, MySQL, and PHP
  9. Click Browser -> http://localhost to view the Drupal initial configuration page
  10. At the Set up database Drupal page, use the following database settings:
  11. * Database name: test
    * Database username: root
    * Database password: (blank)

  12. Finish the Drupal configuration and your website will be up and running

Comments

jasondaniels455’s picture

This is extremely helpful.

Thanks!

ephraim@rubystone.co.uk’s picture

It appears that Drupal is no longer part of the installer, unless I have missed something.

Heine’s picture

WebPI has been redesigned. You can find Acquia Drupal 7 and Drupal Commerce Kickstart on the "Applications" tab.

ephraim@rubystone.co.uk’s picture

Everything but Drupal. Using the search feature return no Drupal items.

erg-web’s picture

Hi

Is there a direct download link for Drupal 7 for Windows?

Using web platform installer forces you to install a SQL Express instance which is not needed as we have a SQL Server 2012 database already in place and having both will cause problems.

Web PI wont let you install without a database selection or give you option to use existing SQL Server?

Eric Wilson’s picture

I am in the same situation, the web platform installer is garbage for any sort of production ready usage. I just finished using the web platform installer to install to a temporary location then edited the settings.php file to point at my real database, then copied the site from the temporary machine to my real IIS install. Seemed to work okay but I do get errors about C:\Windows\Temp being unavailable and there was a deprecated function call in one of the acquia modules. I think I am going to redo everything following this guide that I found as I am not sure I need or want all the acquia stuff:
http://chrislarson.me/content/chris-larson/installing-drupal-iis-microso...

david_garcia’s picture

Detailed step by step instruction to setup Drupal on Windows on the www.DrupalOnWindows.com website.

This is a professional approach, no platform installer or shortcuts, just raw understading of what you are doing!

Christopher James Francis Rodgers’s picture

This is the updated link for the page posted above by Eric Wilson,
to the page by Chris Larson, titled:

Installing Drupal on IIS with Microsoft SQL

http://chrislarson.me/blog/installing-drupal-iis-microsoft-sql.html

The page relates primarily to Drupal 7.


All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *

bobsather’s picture

I had a lot of issues with Drupal on IIS 8. I eventually got it worked out. I compiled a lot of different information and put it into one document that I can go back on. Here's what I have, I hope it helps someone. I may have missed some steps in here, and I apologize for that.

Use Web Platform Installer to install the following:

  • PHP Manager,
  • latest PHP 5,
  • URL Rewrite module.
  • For MySQL, you can install MySQL for Windows 5.5
  • .NET Framework 3.5 (necessary for PHP Manager)
  • C++ Redist for VS2012 32bit (necessary for PHP 5.6+. If you use anything before, 32 bit will work)

Navigate to the c:\inetpub\wwwroot folder and create a new folder with the name of the site. In IIS, create a new site. Point your new site to this folder in IIS.

Example: C:\intetpub\wwwroot\site

Use MySQL command line to create a database user and a database for the site using these steps

1. Create a new database for your site (change the username and databasename):
mysql -u username -p -e CREATE DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;

If you're already logged in (MySQL prompts for password at start of command prompt), skip this part of the code
mysql -u username -p –e

and enter just this part
CREATE DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;

MySQL/MariaDB prompts for the 'username' database password, and creates the initial database files.

2. Log in and set the access database rights. If you're still logged in, skip this step.
mysql -u username -p

MySQL prompts for the username database password.

3. At the MySQL prompt, create the user and set the permissions using the following command:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';

In this case:

  • databasename is the name of your database
  • 'username' is the username of your MySQL user account
  • 'localhost' is the host where Drupal is installed
  • 'password' is the password required for that username

Be sure to use backticks ( ` ) around the database name if you used a MySQL escape character (_ or %) in your database name.

For example, because the underscore character is a wildcard, drupal_test_account.* should be `drupal\_test\_account`.* for security. Otherwise the underscores would match any character and could accidentally give access to other similarly named databases.

Note: Unless the database user/host combination for your Drupal installation has all of the privileges listed above (except possibly CREATE TEMPORARY TABLES, which is currently only used by Drupal core automated tests and some contributed modules), you will not be able to install or run Drupal.

Extract your Drupal .zip file into the website folder in the wwwroot.
Example: C:\inetpub\wwwroot\site\

In IIS while you're at the server level or in the config pane specific to your site, open Authentication

Edit Anonymous Authentication so it is set to Application pool identity

Now that means that the "user" for your site is the application pool identity (something like IIS AppPool\[your site name in IIS]

Example: If my site is named Site, that means I have an application pool identity that I can refer to as IIS AppPool\Site and I'm going to set my permissions for that user.

Now we need to change permissions with Powershell

Setting permissions in Windows to "Modify" should be enough

Open Powershell. Enter the following
icacls path to the folder /grant "IIS AppPool\Application Pool Identity of your site:(OI)(CI)(M)"

Example:
icacls C:\inetpub\wwwroot\site\sites\default\files /grant "IIS AppPool\site:(OI)(CI)(M)"

This gives the Modify permission to our Application pool identity user for the \sites\default\files folder and all of its subfolders.

(icacls /? shows all options. icacls /dirname shows all current permissions)
The following links have more information on AppPools and Permissions:
https://groups.drupal.org/node/252173
https://serverfault.com/questions/81165/how-to-assign-permissions-to-applicationpoolidentity-account

Now, you can right-click your site in IIS and choose browse to start setting up Drupal.