How to install and setup Apache, MySQL and PHP in Windows (WAMP)

This tutorial will show you step by step how to install and setup WAMP (Windows, Apache, MySQL & PHP).

Before you go any farther, there is an alternative to installing WAMP that may accomplish the same thing (local access to AMP) but with a lot fewer steps and much less software to install. You can run LAMP (Linux, Apache, MySQL and PHP) in as a virtual machine via a Bitnami stack for VirtualBox (or VMware Player) and accomplish almost the exact same thing. Depending on exactly what you want to do with AMP there may even be a specific Bitnami stack already completely configured – for example, WordPress.

If a virtual machine isn’t for you, and you want to use WAMP – keep reading.

Table of Contents

Prepare Windows for WAMP
Install WAMP
Getting to know WAMP
Setup Fake Sendmail (optional)


Prepare Windows for WAMP

Here are the requirements for WAMP:

  1. Must have NTFS partition – you probably do, but double-check anyway
  2. Must be later than XP – one of the documents said must be later than Vista, but most of them say XP.
  3. Quit Skype – if you have Skype running make sure to close it.
  4. Quit IIS if you have it running – if you’re not sure if it’s running, it probably isn’t (it’s not enabled by default)
  5. Confirm/install Visual C-Redistributable Packages – for step by step details, see below

Install VC++ Packages

WAMP requires a series of VC++ packages to be installed. Fortunately, there’s a great little helper tool that will check your computer to see which ones are installed and which ones you need to download and install.

  1. Start by visiting the Repository of Wampserver files page, go to the Tools section and download the Checks VC++ packages installed App (the file name is check_vcredist.exe). Double-click that file to run it when the download has completed.
  2. a File Explorer window with an arrow pointing to an exe file

  3. Select your language and click the OK button.
  4. select a language drop down menu

  5. Click the Check button to begin the scan.
  6. an arrow pointing to a Check button

  7. The scan shouldn’t take very long. Once it’s done, you’ll be presented with a list of the VC++ packages that you’re missing and will need to download and install. If you’d like to save the list as a text file, click the Yes button.
  8. a list of files

  9. You can find the packages you need in the Visual C++ Redistribuable Packages section of this page. The one I used was: All VC Redistributable Packages (x86_x64) (32 and 64bits) – since it contains all of the required packages in one zip file.
  10. a zip file full of VC++ files

  11. One by one, install each of the VC++ packages. You need to install both the 32bit and 64bit version of each one if you’re using a 64bit version of Windows. In theory you’re supposed to install them by right-clicking the file and selecting Run as administrator but on my system everything worked fine by just double-clicking them. I’d suggest the Run as administrator route just in case. The installation process for each file only takes a minute or two and mostly involves just clicking Next a few times. Several of them require you to reboot after the installation has completed – make sure to do so.
  12. installing a VC++ package

  13. Once you’ve installed all of the VC++ packages run check_vcredist.exe again and make sure that the scan doesn’t find anything you still need to install. Do not proceed further until the scan comes back with a message letting you know everything has been installed correctly.
  14. an empty check_vcredist app window


Install WAMP

  1. Head over to the download page for WAMP and click the Download Latest Version button. Once the file has finished downloading locate it in a File Explorer window, right-click the file and select Run as administrator (do not just double-click it, make sure to right-click and select Run as administrator)
  2. install WAMP by right-clicking and selecting Run as administrator

  3. Choose your language and click the OK button.
  4. a choose language dialog box window

  5. During the installation you’ll be asked where you want to install WAMP – make sure to choose a folder directly on the root of your C: drive and the folder name has no spaces or special characters in it. The defaults, C:\wamp or C:\wamp64, are ideal.
  6. On the Select Components screen choose which packages you want to install by placing or removing the check-mark in the box next to each item. Click the Next button when you’re done.
  7. a list of WAMP components to install

  8. Towards the end of the installation you’ll be asked which browser you want to use to access the Wampserver – if you don’t want to use the default selection, click the Yes button. You’ll need to navigate to the .exe file for that browser and select it.
  9. choosing a browser to access your WAMP install

  10. Once the installation has completed you’ll find a new icon for Wampserver on your desktop. Double-click it to start WAMP.
  11. the wampserver icon on a Windows desktop


Getting to know WAMP

  1. The WAMP icon in your taskbar notification area will initially appear as a ‘red’ icon – which means none of the services have started. It will switch to yellow as the services are starting up, and green when they’re all running.
  2. the green WAMP icon in the taskbar

  3. Once the icon is green, click it. You’ll be presented with a menu of options – choose the first/top one, Localhost.
  4. the WAMP options menu

  5. Your browser will launch and display all of the current server configurations.
  6. a browser window with the WAMP configurations displayed
    click to enlarge

  7. Click the WAMP icon again but this time select www directory
  8. the WAMP menu with an arrow pointing to www directory

  9. It will open a File Explorer and go to the folder where you store your web pages/apps.
  10. a File Explorer window with the WAMP www folder displayed

  11. If you right-click the WAMP icon you’ll get another menu, with different options. Be sure to review them – there’s a lot to access and/or configure.
  12. the right-click context menu for the WAMP taskbar icon

Some other items of note, directly from the Wampserver creators:

When starting phpMyAdmin, you will be asked for a user name and password. After installing Wampserver 3, the default username is “root” (without quotes) and there is no password, which means that you must leave the form Password box empty. There will be a warning: You are connected as ‘root’ with no password, which corresponds to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user ‘root’. This is not a problem as long as access to Phpmyadmin remain locally. However, some web applications or CMS asking that the MySQL user has a password. In which case, you will create a user with password via the PhpMyAdmin Accounts Users tab.

If you ever run into any issues, the Wampserver forums are a great place to start.


Install and setup Fake Sendmail

  1. If you’re running Windows and have an outgoing (SMTP) mail server already installed on your PC, and can be accessed by localhost, you can skip all the steps in this section – you’re done.
  2. Because a number of services you may use require a working mail server, we’ll set up Fake Sendmail and use your ISPs outgoing mail server. An example of a service that requires working mail is WordPress – if you forget your password and want to reset it, WordPress will email it to you. Without Fake Sendmail (or a local SMTP server) every time a service tries to send an email, it will fail.
  3. Head over to https://www.glob.com.au/sendmail/ and download sendmail.zip. If your ISP requires that you use SSL, make sure to download sendmail-SSL.zip as well. Create the folder(s) C:\usr\lib\ and extract sendmail.zip (and sendmail-SSL.zip if you need it) into that folder.

  4. click to enlarge

  5. Open up sendmail.ini in Notepad. Scroll down to the smtp_server= section and change it to smtp_server=your.smtp.server, where your.smtp.server is your ISPs outgoing mail (SMTP) server. If you’re unsure of your outgoing mail server, you can try this list of ISP mail servers – if yours isn’t listed there, check w/ your ISP. In the smtp_port= section, make sure it’s set to 25 – assuming your ISP uses port 25 for SMTP (not all do – though mine does).

  6. click to enlarge

  7. In the default_domain= section, add your ISPs domain. For example, if you use Comcast as your ISP, add comcast.net. Because I have service from Telus, my default domain is telus.net (as seen in the screenshot below).

  8. click to enlarge

  9. If your SMTP server requires authentication, add your username to the end of the auth_username= field, and your password to the auth_password= field.

    Note: you can use the Gmail SMTP server (see this FAQ for details) – assuming you have a Gmail account. However, during testing I noticed a considerable delay in receiving mail – up to 7 hours. Using my ISPs mail server settings there was no delay at all.


  10. click to enlarge

  11. Save your changes to the file (sendmail.ini) and exit Notepad. Now click the WAMP icon in your System Tray, select PHP and then click php.ini.
  12. Scroll down to the [ mail function ] section. Comment out each of the For Win 32 lines by adding a semicolon ( ; ) in front of each one (see screenshot below). Uncomment the line sendmail_path = by removing the semicolon ( ; ) in front of it. Add "/usr/lib/sendmail.exe -t" to the end of the line, so that it reads: sendmail_path = "/usr/lib/sendmail.exe -t" (again, see the screenshot below).

  13. click to enlarge

  14. Save php.ini and exit out of Notepad (or whatever editor you used to edit php.ini). Click on the WAMP icon in your System Tray and select Restart All Services.
  15. Now any time one of your web services needs to send an email…
  16. it will go through!
  17. That’s it – you’re done! You now have a fresh install of WAMP on your PC.

If this article helped you, I'd be grateful if you could share it on your preferred social network - it helps me a lot. If you're feeling particularly generous, you could buy me a coffee and I'd be super grateful :)

buy a coffee for simplehelp.net


Home » Web Design & Dev » How to install and setup Apache, MySQL and PHP in Windows (WAMP)

15 thoughts on “How to install and setup Apache, MySQL and PHP in Windows (WAMP)”

  1. What a nice and easy to follow tutorial thank you thank you very much specially for the “installing fake Sendmail” part

  2. The $cfg[‘blowfish_secret’] = ; line can be found in the config.sample.inc file which is in the same directory as config.inc.
    Just take the line from there and paste it into config.inc …

    Great tutorial!

  3. Thank you very much! Out of all the tutorials I found out there, this was by far the best AND easiest! Kudos and Thanks!

  4. This indeed made a great contribution for me as a novice user of the wamp server. Thank you very much

Leave a Comment

Your email address will not be published. Required fields are marked *