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
Here are the requirements for WAMP:
- Must have NTFS partition – you probably do, but double-check anyway
- Must be later than XP – one of the documents said must be later than Vista, but most of them say XP.
- Quit Skype – if you have Skype running make sure to close it.
- 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)
- 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.
- 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.
- Select your language and click the OK button.
- Click the Check button to begin the scan.
- 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.
- 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.
- 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.
- 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.
- 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)
- Choose your language and click the OK button.
- 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.
- 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.
- 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.
- Once the installation has completed you’ll find a new icon for Wampserver on your desktop. Double-click it to start WAMP.
Getting to know WAMP
- 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.
- Once the icon is green, click it. You’ll be presented with a menu of options – choose the first/top one, Localhost.
- Your browser will launch and display all of the current server configurations.
- Click the WAMP icon again but this time select www directory
- It will open a File Explorer and go to the folder where you store your web pages/apps.
- 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.
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
- 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.
- 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.
- 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.
- 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).
- 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).
- 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.
- 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.
- 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).
- 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.
- Now any time one of your web services needs to send an email…
- it will go through!
- That’s it – you’re done! You now have a fresh install of WAMP on your PC.