How to install Drupal 7 on WAMP


This article will explain how to set up Drupal 7 on WAMP, for windows. WAMP is a software package that installs Apache, Mysql and PHP at once and also offers an easy management interface. It also installs PHPMyAdmin, sqlbuddy and webgrind. An alternative to WAMP is XAMPP which I haven't tried yet but does much the same kind of thing. XAMPP has a portable version for running USB sticks which looks quite interesting.

Once we're done, you'll have a Drupal 7 install running under http://localhost/d7

Step 1. install WAMP

Head on over to the WAMP download page and choose an install package. I chose a 32 bit version running PHP 5.3 and Apache 2.2. I would steer clear of PHP 5.4 for now as I am not sure how 'PHP 5.4 ready' Drupal 7 or the contrib modules are.

Before you install WAMP download and install the c++ redistributable package from Microsoft, the WAMP page will give you instructions. Install the C++ redistributable package first..

Then install WAMP..

Once done, assuming WAMP isn't running already, start it and look at http://localhost in your web browser, you should see this:

in the icon notification section you should see this:

If the icon is orange, rather than green there WAMP couldn't start normally. I have experienced this twice, the first time it was a port conflict with Skype, the second time was simply that I hadn't installed the c++ redistributable properly. If WAMP isn't starting the first thing to check is a port conflict on port 80, check this from here by clicking on 'Test port 80'.


If skype is using that port, the simplest thing would be to make Apache listen to port 81, open the httpd.conf from here:


Then change:

Listen 80


Listen 81

and restart apache.

Here is a good page on fixing WAMP start problems.

Step 2. Enable Mod rewrite

Drupal can have nice clean URLs without ?q=xxx but you need to have Apache Mod Rewrite running. From the WAMP icon in the start bar enable this:

Step 3. Set up a Drupal 7 database

From PHPMyAdmin go to the SQL tab which should look like this:
and enter the command:

CREATE database d7;

Step 4. Create a Drupal 7 db user

Again from the SQL tab, enter these commands one by one, the username and password can be anything you like but you need to keep a note of them for later.

GRANT ALL PRIVILEGES ON d7.* TO 'd7'@'localhost' IDENTIFIED BY 'd7pass';
flush privileges;

Step 5. Download Drupal 7

Head on over to the Drupal site and download the latest 7.x version of Drupal. Extract it to the WAMP apps folder which should be:


so then you'll see this:
then rename the Drupal folder to d7. You could leave as it is, it'll just make for an ugly URL that's all. I consciously just added a directory inside www to make it easier to add new sites, just create new directories for other sites as you wish.

Step 6. Install Drupal

Ideally there would be a mail server running, which is cinch to set up on linux but I'm skipping that for now with this windows install, and we'll make do without. Choose the standard install rather than minimal.

Go to the drupal install page which will be http://localhost/d7/install.php which should look like this:

Enter your details, using the database settings you set up previously. The site email address is where users will appear to get mails from the Drupal 7, just enter anything and be careful about entering the user details. doesn't actually work but I needed to add some kind of mail address to prevent Drupal throwing a mail validation error. Remember this is only what will appear in the 'From' part of mails. I usually name the first user 'admin'.

Submit the form, wait a few seconds and Drupal should be installed, you can now view it and log in with the account you created.

Step 7. Enable clean URLS

Assuming you enabled Mod Rewrite, it's time to make Drupal use clean urls. Go to:

Configuration > Clean urls
then check Enable clean urls

Final tip

The log in page is:

Where to go from here

Be you non-techie, designer or developer, if you are completely new to Drupal I would explore the documentation section and I can highly recommend the book Using Drupal. If you are designer, try out some themes, and get into theme development. Starter themes will help you get going, you won't need to totally reinvent the wheel.

Developers I will cover in further tutorials on more technical topics such as Drush and module development. If you encounter any problem s, post a comment.

Blog tags: