Installing and Configuring a WAMP Server on Your Computer

There are times when we are so anxious to jump into creating something new that we forget to cover the basics. For web developers it is important, actually vital, to have the ability to test your projects locally before they go live.

While much of the web relies on a Linux, Apache, MySQL, PHP stack, or LAMP, to power applications and dynamic websites, not everyone codes in a Linux environment.

Those who prefer Windows can still replicate how their code will work by using WAMP to replicate a live web environment right on their own computer with the only difference being substituting the Linux operating system in the stack for Windows.

Obtain a copy of WAMP

Before you do anything you need to download WAMP from http://www.wampserver.com/en/download.php. You will have the  option to choose wither a 32 or 64-bit environment depending upon your computer’s configuration. In addition to Apache, PHP and MySQL this download includes phpMyAdmin and SQLBuddy to better help you manage your databases through web based GUI rather than having to use a terminal interface.

Install the software

Once you have downloaded and uncompressed your WAMP executable you will need to go ahead and launch it to start the installation process.

When you click next you will be asked to accept the license agreement. Since it is a GPL license you are free to do just about anything with it so you can go ahead and accept.

The next step requires you to select the folder where you would like to install your WAMP server. The default will be c:\wamp however you can change this to install the server into any directory or partition you choose.

Installing WAMP step 2

Chose where to install the software

After you choose your directory you will have the option to setup icons. Once you decide on this click Next and then confirm the installation settings again by clicking Install.

Once the installation runs its course you will be asked to choose your default browser. Internet Explorer is the default choice but you can navigate your way to any other browser of your choosing.

NB – if your Windows firewall pops up at this point make sure to grant Apache access.

The next decision you will have to make is to set the PHP mail parameters. Many people leave this set to the defaults when setting up a testing server on their local computer. If you wish to configure it to connect to your SMTP server you may do so here but unless you plan on testing email capabilities the default entries can be left and all you need to do is click Next.

Selecting the SMTP server

Setting the SMTP server (optional)

Congratulations, WAMP is now installed on your local computer.

Testing the installation

Now that everything has been installed let’s test everything out.

Using one of the icons you created, or Start –> All Programs –> WampServer –> start WampServer, you can launch the management console. Once opened, it will appear in the lower right hand corner of your screen.

WAMP Management

The WAMP management console

If WAMP is not started go ahead and click Start All Services. If you are not sure whether or not WAMP is running, look for the small green W icon in your toolbar. If it is red, WAMP services are stopped, green means everything is running while orange means some services are running.

Now we want to test to see if everything was installed correctly. In the WAMP management console, click on Localhost. If you see the following screen pop up in your browser then everything is working!

Localhost shows everything is good

WAMP services are running

Configuring phpMyAdmin

The last step is to set a password for phpMyAdmin. Many people forgo this step because the server is not going to be live so they don’t see the need to protect the database if it is only sample data. You can decide what practice to follow.

In order to change the password you will need to navigate to your phpMyAdmin file, located at C:/wamp/apps/phpmyadmin3.x.x and open the config.inc.php file for editing.

Once opened, navigate to the lines that read,

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'xxxxx';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Where the example reads xxxxx insert your password. Under AllowNoPassword, change the value to false.

What do I do next?

Now that everything is installed and working you can upload test websites to your root or even install third-party web applications like WordPress, Moodle, Drupal, etc. to this location. You now have a sandbox in which to work on your development projects! Have fun with it.

SHARE THIS POST
  • http://www.facebook.com/profile.php?id=100000996406651 Varun Tyagi

    i have done all the steps as you said. but when i launch the phpmyadmin from localhost i get this error
    “Error
    MySQL said:
    #1045 – Access denied for user ‘root’@'localhost’ (using password: YES)
    phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.”

    what should i do now to fix this?

    • Spring

      i am haveing the a problem when i downloadedit it displays the below message
      HTTP Error 404. The requested resource is not found

      • Anonymous

        Link worked fine, try copying and pasting into your address bar.

    • Anonymous

      What are you using for the username and pw?

    • Jeanine

      I ran an update using the MySQL console (before updating the password in the config file):

      mysql> update mysql.user set password=password(“new”) where user=”root”;
      mysql> flush privileges;

      And then proceeded to set the password in the config.inc

  • aroob

    I get error 404 Not FOund when i try to open phpMyAdmin from wampserver.

    The description is: The requested resource (/phpmyadmin/) is not available.

    I have changed Listen 80 to Listen 81 in Apache- httpd.conf but still i have the same problem.

  • http://www.techflashed.com/ Tech Flashed

    can we install wamp on the main server that will run the website live , can i know the pros and crons of the same .

    • sky

      u need to have ur PC on forever :( u switch it off , ur site’s gone :(

  • akhil

    when i click on Localhost. there is no screen pop up in browser ….
    how can i over come this

    • http://twitter.com/DynastyPunkrock Dynasty Punkrock

      If you have Skype running, turn it off and click “restart all services” on WAMP management console. The logo will turn green and you can turn Skype back on afterwards. Did the trick for me.

      • Rajesh Khillawan

        Thanks..this worked for me

  • http://www.facebook.com/info.eyohonesty Eyo Honesty

    I have installed the WAMP server on my WIN7 along with my IIS 5+. But when I click localhost from the WAMP toolbox @ d bottom-right conner of my taskbar, the browser displays the IIS7 start-up page. What does this mean and what should I do? Because everything is not working fine. Thank you.

    • john lewis

      IIS is still running which is conflicting with WAMP. You should choose IIS or WAMP because they don’t play nice with each other. You could always change the port for WAMP though to something else other than 80, and you may get a chance of running both, if you are determined to have both.

  • ameer

    I cannot opened my localhost. the page shows forbidden- something like you do not have right to access it notification. how to configure or setting wampserver so that it can enable access? the icon now is red in colour, but it written -server online… hmm… could you help me?

    • nikhil

      please install c++ 2010 redistributable file from microsoft main site, then you will on your way.

  • Akash Mayekar

    After selecting default browser get an error MSVCR100.dll was not found

  • Boisey

    Well, I went back and I set IE as my default browser and the result is
    The website declined to show this webpage HTTP 403 Most likely causes:
    This website requires you to log in. What you can try: Go back to the previous page.Go back to the previous page.

    Now I feel as if I have taken at least one step forward, yet two steps back, It feels as though I am in a loop, if someone has the time to add a response then know that it would be greatly appreciated.

    Thanks

    • Andrea Hincerooney

      I’ve got exactly the same problem. Eager to know how to solve this. Anyone? Anyone? …

  • http://www.facebook.com/jan.bol.5 Jan Bol

    I noticed that at least for Wamp 2.2 the settings for the MyAdmin password are in the config.inc file

  • bob@fleming-family.com

    I installed wampserver (64-bit version) as explained above and now have the wampserver icon on my desktop. But when I double click on the icon all that happens is that I get an alert window from User Account Control that says, “Do you want to allow the following program from an unknown publisher to make changes to this computer?” then it lists program name wampmanager.exe. Regardless of whether I click on “Yes” or “No” the same thing happens — the alert window goes away and I am back at the desktop. Double clicking again on wampserver just repeats the process. I’m stuck!

    • heidi

      try changing your httpd.conf file so that it says Listen 81 instead of Listen 80, save the file, then type http://localhost:81/ into the browser. that is what i did to make it work

  • sky

    thank you jeff :) it does work now :) can u please tell me that :
    1. where do i write the php code ?
    2. how do i test my php code on a browser ?
    and is php tough to learn ?
    please do answer sir :) thank you :)

  • http://www.facebook.com/alansmithspinx Alan Smith

    As per me Testing and Security both are the major parts of server. what do you say all?

  • http://www.kizipapa.com/ Kizi 3

    You are clearly excellent at gathering information and writing it in clear terms for your readers. i prefer your distinctive wrestle this subject which i contemplate you on lots of it.

  • Clovis

    after setting up the password for php how can i login into phpadmin?

  • Ramon Diaz

    WAMP not stable on win8 but win7 was okay. Need to do a bit of settings on some config on the apache and host file.

  • Roben Thokchom

    I finish the Installation but when I type http://localhost/ to my browser, 403 error is occur. So what is the problem may be?

  • Namrata Patel

    i have installed wamp nd done setting also but my server taking database nd opening multple tabs when i exectued php code plz help me

  • someone

    i just write in the user @package and nothing in password and it works and i see that when i open the file you mention in the article and i found in line 10 that @package PhpMyAdmin, sorry for my language but i just want to help.

  • Akmal

    i installed wamp server but its in orange color because apache doesent starts i click many times over start service but it doesent start while everything installed corectly and by clicking in localhost it sayes:
    404 page not found

  • om prakash

    in my laptop wamp server is not working in the local
    user account .it work only in administrator account but i want to run
    wamp server in local user account because i do not have administrator
    access right pls help me how can i run wamp server in my local user
    account.

  • Karsho

    Nice…

  • http://www.steptoinstall.com/ Karsho

    Clear, Simple and Helped.

    Thanks Dude…