There is no place like 127.0.0.1

Posted on September 1, 2014

A look into how to install Drupal 7 in Windows using XAMPP.

No matter where you go if you have your localhost running then you got a home. A local server is like a playground for developers. Don’t have an internet connection, want to test out dummy lorem ipsum text for content, want to constantly upload photos, these doesn’t matter when you are working on 127.0.0.1 aka “localhost”. With a few clicks you can easily setup your own website using the champ Drupal. The local server is the legs with which a Drupal website can start running like Forrest Gump.

There are several approaches to set up a local server to run a Drupal site in localhost. You could:

  1. Manually install Apache, MySQL, PHP and configure it yourself.
  2. Install an application which automatically setup this environment e.g.: XAMPP, MAMP, LAMP, etc.
  3. Use a virtual machine to set up your server in its own environment, even with a different operating system. See Quickstart, DrupalPro, Drupal-up, or Aegir-up for examples of fully loaded development VMs that can be run on any operating system.

Let’s install Drupal in our localhost using XAMPP in Windows. First we need to setup the XAMPP and when it is up and running we can install Drupal to build our site.

Installing XAMPP

  • Download the XAMPP for Windows from https://www.apachefriends.org/index.html
  • Install XAMPP like any other software in Windows
  • After installation is completed hit the XAMPP control panel
  • Post Sample Image

  • Start Apache and MySQL.
  • Post Sample Image

    If you have IIS or another program using default http port (80), you can change the default port for Apache opening up the config file C:\xampp\apache\conf\http.conf in a text editor and replace the following entries: Listen 80 by Listen 81 ServerName localhost:80 by ServerName:81

  • Now enter http://localhost/xampp/ in a web browser and boom your local server is up. It should show something like this.
  • Post Sample Image

    Now that we have our local server lets install Drupal to build an awesome website.

  • Go to http://drupal.org/project/drupal and download the latest Drupal releases.
  • Unzip the downloaded zip file and extract it to C:\xampp\htdocs
  • Rename the folder according to your comfort. Let’s rename it foobar.
  • Goto http://localhost/phpmyadmin and login to your PHPMyAdmin and create a database for your Drupal site.
  • Post Sample Image

  • Enter http://localhost/foobar/install.php in your browser to start the installation.
  • Post Sample Image

  • Hit Save and continue. In the next page choose the language which is English by default
  • On the next page you need to enter the database details to connect the Drupal site with the database.
  • Post Sample Image

  • The Drupal installation will start in the next page.
  • Post Sample Image

  • Enter your website details like Site name, the super user/admin username and password, time zone, etc.
  • Post Sample Image

  • Save and Continue. And you are done. Now checkout you’re your new website running in your local server.
  • Post Sample Image

    Related Links:

    1. Install Drupal in Ubuntu.
    2. Install Drupal using MAMP.