Installing Drupal on Your Windows Machine

When you are trying to learn Drupal for work or personal development, the cheapest, easiest, and fastest solution is to install it on your local machine.

However, if you are not a super super nerd with lots of experience with apache, mysql, and the works, I can guarantee you will run into a snag very quickly.

Firstly, Drupal needs a *AMP environment – that is, it needs Apache, MySQL, and PHP. To my knowledge, you cannot just install the three on your windows machine and have everything groovy. If you try to do this, you will have problems, they will be frustrating, and it will waste your time. Instead, let’s go for a program already designed for specifically this purpose.

Xampp's Intuitive Control Interface

Here is an excellent video tutorial on how to get started with XAMPP for Windows. The presentation then goes on with how to get started with Drupal as well, keep watching. When you get to the point to where it starts to walk you through the installation of Drupal and editing files and moving things around, don’t do that. Instead, STOP, point your browser to your localhost drupal directory, and then follow the drupal installation wizard. Everything is much faster easier and pain free. The only thing you might encounter is drupal asking you to copy/paste/rename a settings file, dont worry this is normal.

Advertisements

Installing PHP on Windows

I have a hosted server and was using that to develop but my code quickly became too large for print statements, I needed debugging. Decided to install Eclipse on my windows machine so I could develop locally and with debugging support.

Here is what you need to do.

1. Install IIS

Go to control panel > Install/Uninstall Programs and Features > Turn Windows Features On/Off . Check Internet Information Services. Next, under Internet Information Services>World Wide Web Services > Application Development Features, check CGI.

2. Install PHP

Go to http://windows.php.net/download/ and pick up the latest Windows Installer, it should be one of the first links you see. You want to get the non-thread-safe version. This version is fast, easy to install, and works right away, in contrary to the thread-safe version. Simply follow the installer and you will be on your way.

3. Test

Create a new file, info.php, containing these contents:

<?php phpinfo(); ?>

Put the file somewhere in your  IIS directory, say, C:\inetpub\wwwroot\phpinfo\ and then point your browser to http:\\localhost\phpinfo\info.php . If you see a long webpage with lots of configuration details then your PHP is working properly and everything is groovy.