Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

How to Install Apache, mySQL, and PHP on Windows (WAMP)

The Easy Way - Use an Installer Like AppServ

By Jennifer Kyrnin, About.com

Choose the Right WAMP Installer

There are a number of different WAMP installers out there you can use to install Apache, MySQL, and PHP on Windows (WAMP). Some of the better ones are: AppServ, EasyWamp, FoxServ, PHPDev, PHP Triad, Typo3 WAMP Installer (includes a CMS program), and WampServer. I'm going to show you how to use AppServ.

How to Install AppServ

  1. Download AppServ from SourceForge and double click it to open it.
  2. Agree to the license and then choose the directory where you want to install AppServ.
  3. I recommend you install all four elements: Apache, MySQL, PHP, and phpMyAdmin. The only one not required for a testing server is phpMyAdmin, but it's very useful.
  4. Because this is being set up as a testing server, use "localhost" as the server name and "admin@localhost" as the administrator's email address. You can leave the port the default (80).
  5. MySQL defaults to a blank root password, but that is very insecure, so give your set up a secure root password - one that you'll remember. Then click Install.
  6. AppServ will go through all the steps to install Apache, MySQL, and PHP on your system.
  7. Have AppServ start Apache and MySQL, and then browse to http://localhost/ to see your new Web site.

Configure Your WAMP Server

AppServ puts all your Web pages into the "DocumentRoot" - this is located in the www sub-directory off of the AppServ directory that you chose. The default is "C:/AppServ/www".

I recommend changing this location, so that your testing server is located nearer to your other Web files. To change the location of your server:

  1. Open httpd.conf in a text editor. The httpd.conf file will be found in the AppServ/Apache2.2/conf directory.
  2. Search for the word "DocumentRoot" in that file.
  3. Place a hash mark (#) at the front of the line that starts DocumentRoot. This will comment out this line.
  4. Write a new line that reads:
    DocumentRoot "Full path to your Web site directory"
  5. Then go down to a line that reads:
    <Directory "C:/PROGRA~1/AppServ/www">
    and change the path in quotes to your DocumentRoot path.
  6. Restart Apache (go to your Start menu, All Programs, AppServ, and choose "Apache Restart" in control server by service).

If you want phpMyAdmin running on your server, you'll need to copy the phpMyAdmin folder from the AppServ/www folder into your new DocumentRoot folder. Login using the root username and password you defined in setup.

Explore Web Design / HTML

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. Web Programming
  5. How to Install Apache, mySQL, and PHP on Windows (WAMP) - Use an Installer Like AppServ

©2009 About.com, a part of The New York Times Company.

All rights reserved.