Developing Drupal using XAMPP

Using XAMPP to create a full featured Drupal development workspace. I used the following to create a multi-site, mail enabled, flexible, development environment on MS Windows XP:

1. Install XAMPP Lite

This should result in the following folder strucure:

You can test the XAMPP install by starting it and then browsing to http://localhost.

If you see the following then you have successfully installed XAMPP:

2. Configure XAMPP to enable multi-sites and clean URLs

  1. Edit C:\xampplite\apache\conf\extra\httpd-vhosts.conf (I usually make a backup of all edited files called [filename].original) by appending the following to the end of the file:
    # theneemies _
        DocumentRoot "C:/xampplite/htdocs"
        ServerName localhost:80
    <VirtualHost sandbox.local:80>
        DocumentRoot "C:/xampplite/htdocs/drupal6"
        ServerName sandbox.local
        ServerAlias <a href="http://www.site1.local" title="www.site1.local">www.site1.local</a>, <a href="http://www.site2.local" title="www.site2.local">www.site2.local</a>, randwick.local 
    # _ theneemies	
  2. Include the domain names you've listed in httpd.conf in C:\WINDOWS\system32\drivers\etc\hosts:       localhost       randwick.local       sandbox.local
  3. Edit C:\xampplite\apache\conf\httpd.conf by uncommenting (remove the leading #) LoadModule rewrite_module modules/
  4. Configure Drupal for multi-site by creating the folders randwick.local and sandbox.local within C:\xampplite\htdocs\drupal6. The result should be C:\xampplite\htdocs\drupal6\sites\randwick.local and C:\xampplite\htdocs\drupal6\sites\sandbox.local folders.
  5. Restart XAMPP for your changes to take effect:
  6. You should see the XAMPP splash page when viewing http://localhost and the Drupal install page when viewing http://sandbox.local. Install Drupal and ensure that clean URLs are working.

2. Install and configure Stunnel to send emails using your GMail account.

  1. Edit C:\xampplite\apache\bin\php.ini:
    ; theneemies (uncomment this line) _
    ; _ theneemies
    [mail function]
    ; For Win32 only.
    SMTP = localhost
    smtp_port = 25
    ; For Win32 only.
    sendmail_from = admin@sandbox.local
    ; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
    sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t";
  2. Edit C:\Program Files\stunnel\stunnel.conf and replace with:
    cert = stunnel.pem
    socket = l:TCP_NODELAY=1
    socket = r:TCP_NODELAY=1
    debug = 7
    output = stunnel.log
    client = yes
    accept =
    connect =
  3. Edit C:\xampplite\sendmail\sendmail.ini to use your GMail account:
    ; you must change to your smtp server,
    ; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
    ; emails delivered via IIS's pickup directory cause sendmail to
    ; run quicker, but you won't get error messages back to the calling
    ; application.
    ; smtp port (normally 25)
    ; the default domain for this server will be read from the registry
    ; this will be appended to email addresses when one isn't provided
    ; if you want to override the value in the registry, uncomment and modify

    ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
    ; uncomment to enable logging
    ; create debug log as debug.log (defaults to same directory as sendmail.exe)
    ; uncomment to enable debugging
    ; if your smtp server requires authentication, modify the following two lines
  4. Start Stunnel, restart XAMPP, and use Drupal to send an email (send a notification when creating a new user, the new user should receive an email).