Blog

Thursday, May 10, 2012
Drupal 7 on Windows
I have a fairly reasonable "WIMP" stack (Windows, IIS, MySQL, PHP) running on my work machine now, and I wanted to document how I got there, for future reference, or for anyone who might stumble across this blog post. My setup has evolved over time, so I'm not 100% sure if these instructions would work exactly right from scratch.

There are some ways to get a Drupal-compatible "WAMP" stack (Windows, Apache, MySQL, PHP) running on Windows pretty quickly, but most of the stuff you really need to do in Drupal works OK in IIS. And I think that the approach I outline below gives you the most flexibility in terms of also using the components for stuff other than Drupal.

In these instructions, I'm creating a Drupal site named "drupal-7-test", but it doesn't really matter what you call it.
  1. Get Web Platform Installer from http://www.microsoft.com/web/platform/.
  2. Use Web Platform Installer to install "IIS 7 Recommended Configuration." You may also need to install URL Rewrite if you don't already have it.
  3. Install MySQL via the MySQL Installer for Windows. (Do not use Web PI.) Select "developer default" to get the MySQL Server, Workbench, and a few other useful things. For configuration, select "developer machine."
  4. Install PHP 5.3.x from http://www.microsoft.com/web/platform/phponwindows.aspx with Web PI. (This will pull in a few other necessary components.) (Do not install the PHP for WebMatrix -- click the link on the above page.) (Oh, and the page still says "PHP 5.3.5," though the actual installer has been updated to a more recent version.)
  5. In IIS Manager, go to "default web site" and click "PHP Manager". Make a note of the location of the config file and the error log. Click "configure error reporting" and select "Development machine". Click Apply.
  6. Get phpMyAdmin from http://www.phpmyadmin.net and unzip it to c:\inetpub\wwwroot\phpmyadmin. Go to http://localhost/phpmyadmin and run through the setup.
  7. In phpMyAdmin, create a user named "drupal_7_test". Click the checkbox to also create a database of the same name, and give that user all rights to it.
  8. Get Drupal 7 from http://drupal.org/download and unzip it to c:\inetpub\wwwroot\drupal-7-test. (The standard Drupal 7 download includes a web.config that enables clean URLs for IIS, given the MS IIS Rewrite module.)
  9. Give IIS_IUSRS modify rights to sites/default/files.
  10. Go to http://localhost/drupal-7-test and run through the setup. Use the MySQL database & user created earlier.
  11. Go to the status report in the Drupal admin and check that everything is working OK.

Random follow-up notes
It's June 10, and I'm setting up a WIMP environment on my ThinkPad. I've also recently set up a WIMP environment on my new work desktop, so I've got a few follow-up notes on this post.

Labels: , ,

posted by Andy H. 8:19 PM
0 comments

Comments: Post a Comment


This page is powered by Blogger. Isn't yours?
© 2011 Andrew Huey