Installing Drupal on a Local Machine - dummies

Installing Drupal on a Local Machine

By Lynn Beighley, Seamus Bellamy

Installing and running Drupal on a local computer, perhapse even your personal machine, can be helpful if you want to learn how to use Drupal without the expense of signing up with a web host. Although installing Drupal on your local machine is similar to the manual web-host installation you will have the added steps of installing the correct Apache, MySQL, and PHP versions.

    What you need

Drupal needs Apache, MySQL, and PHP. You have to install these first, and installing each one involves downloading the software, extracting it in the correct location, making any file configuration changes, and testing it. You should install MySQL first, then Apache, then PHP.

Walking through the installation of these three products is rather involved, fortunately, some developers have put together applications that install all three of these packages at the same time for you. Read on.

    Getting Apache, MySQL, and PHP

Several companies have taken the hard work out of installing these individual packages. Each of these companies provides its own single program that installs all three applications for you. These are recommended:

  • DAMP may be your best option. It installs Apache, MySQL, PHP, and also installs Drupal.

  • XAMPP describes itself as “an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use — just download, extract and start.” It can be installed on Linux, Windows, and Mac OS X.


  • WAMP is a Windows option.

  • MAMP is a great option created just for Mac OS X. Commercial and free versions of the software are available.


    Finishing installation on a local machine

After you’ve got MySQL, PHP, and Apache running, whether individually or through XAMPP or MAMP, you are ready to set up a database and install Drupal.

To set up a database and install Drupal on a local machine, follow these steps:

  1. Locate and open the phpMyAdmin program installed by XAMPP or MAMP.

    You may need to login with the username root and a blank password.

  2. Locate the Create a New Database text box on the right side of the phpMyAdmin screen.

  3. Type drupal as the name of your new database, and click the Add button.

The next order of business is to download the Drupal software and install it on your local machine under the web directory. Follow these steps:

  1. Browse to

    Click Download & Extend on the upper-right side of the page just above the Search box.

  2. Click the Download button and scroll down the page to locate the table with the Download link; click it.

    The file will be named something like

  3. Save this file to a directory you will remember.

  4. Double-click or right-click the Drupal .zip file to extract it.

    It will be extracted as a single folder.

  5. If necessary, rename the extracted folder drupal.

  6. Copy the drupal folder to your local web server directory.

    Move this new folder to your local web server directory. This location depends on which package you used to install Apache. Consult the documentation for your particular package to find the web directory on your machine.

Now you are ready to run the installation. To reach it, browse to http://localhost/drupal.

Some server packages may require you to browse to http://localhost:8888/drupal. Check your server software’s documentation.

    Running the installation

Drupal will take you through a series of forms.

Enter the name of the database you created earlier, drupal, in the Database Name text box. For the database username and password, enter the username and password you chose. Click the Save and Continue button.

After you set up the database, you see the Configure Site page. Upon completion of this form your Drupal site is completely installed.