Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.
A great many websites are run using a trio of services: Apache, MySQL, and PHP. It is a tried and tested combination which works phenomenally well, most of the time. Usually, to gain access to this trifecta, you need to purchase web hosting. The web hosting runs on a remote server that is highly likely running some form of Linux.
However, wouldn’t it be easier if you could bring the service trio to your computer to run locally? A WAMP server does just this. Read on to find out how to set up a WAMP server on your Windows 10 machine.
What Is a WAMP Server?
First thing first: what is a WAMP server? WAMP stands for Windows Apache, MySQL, and PHP. Compare this to LAMP (Linux Apache, MySQL, and PHP) or MAMP (Mac Apache, MySQL, and PHP).
A WAMP server, then, is a web development environment for Windows. Instead of requiring access to a server featuring Apache, MySQL, and PHP, a WAMP server creates a local environment. The local environment lets web developers continue their work offline, as well as test features before rolling them out into live environments. (Here’s how to create a virtual web development environment.)
Apache, MySQL, and PHP are all available for individual download. Each service has a Windows installer. (How to install MySQL on Windows 10 explains more) However, you then have to configure each service. And while countless tutorials show you exactly how to do this, a WAMP server automates a decent proportion of the configuration.
How to Install and Set Up WampServer
For the rest of the article, I’ll talk about WampServer, the official installation. Using WampServer is often the fastest and easier way. Plus, it has a lot of online support, too. Let’s set it up!
Step 1: Download and Install WampServer
Head to the official WampServer site and download the latest version for your operating system type (32 or 64-bit) At the time of writing, WampServer 3 includes Apache 2.4, MySQL 5.7, and PHP 5.6. When the download completes, run the installer.
The installer makes it clear that you should not install WampServer over an existing version. The default installer options should suffice for most users, but you must install WampServer in the root of the directory (e.g. C:\wamp or C:\wamp64). I would recommend changing the default browser to something more modern than internet Explorer. Similarly, if you want to select a different Notepad option, go ahead.
Please note that WampServer does not work on FAT32 or exFAT drive partitions. It only works on an NTFS drive. Also, WampServer 3 will not run on Windows XP because it uses Apache 2.4.X as well as requiring Microsoft Visual C/C++ Redistributable 2015 (VC14).
(Of course, you shouldn’t be running Windows XP in this day and age…)
Step 2: Configure WampServer
When the installation process completes, you can launch WampServer. When you first run it, you’ll spot a black command window. It will only flash on your screen for a few seconds, before disappearing. When the Windows Firewall notification appears, allow WampServer to connect using your private network. Your next port of call is the system icon tray where WampServer is lurking.
Head to the tray. If the WampServer icon is green, your WampServer services are active and ready for use. If the icon is red or orange, it means something on your system is interfering with WampServer. The best course of action is to restart your system, then open WampServer again. Skype is known to interfere with WampServer, as are some games that use Port 80 to communicate with the internet.
When the icon is green, you can head to your browser. Type http://localhost in the address bar and press Enter. All being well, this will display the WampServer homepage, like so:
From here you can access tools such as phpinfo and phpMyAdmin, as well as the official Apache and PHP documentation. Furthermore, when you create a new project, it will appear on this homepage under Your Projects. The same goes for Your Aliases, but these are for your project databases.
Step 3: Create Your First WampServer Project
Now to make your first WampServer project. In the following example, you will install WordPress to WampServer for local access.
Create a blank MySQL database for your new site. Select phpMyAdmin from the WampServer http://localhost page. The default username is root, and there is no password (you can fix this in a moment—even though its local, you should still keep security practices). After logging in, select Databases from the menu bar. Enter a name for your database, and press Create.
Next, install WordPress. If you left the WampServer installation to its default settings, you will find your project folder at C:\wamp\www or C:\wamp64\www.
Head to the www folder, then right-click and select New > Folder from the context menu. Name the folder “WordPress.” Download the latest version of WordPress and extract the contents of the archive into the wamp\www\WordPress\ folder.
Now to check if the WordPress installation is working.
Type http://localhost/wordpress in your web browser address bar and press Enter. You should find the WordPress site Index, from which you can select wordpress/. The WordPress installer should start automatically and guide you through the installation process. (The username and password are the same as the MySQL login, and you just created the database name.)
All being well, you will reach the Run the installation screen. From here, you fill in your website information, after which you can access your WordPress dashboard using the Log in button.
Congratulations! You just finished creating your first WampServer project using WordPress. However, if you want another project, check our our tutorial on how to host a WordPress site on a Raspberry Pi (using a LAMP server).
WampServer Advanced Settings
WampServer is highly customizable depending on your requirements.
Depending on the type of program you attempt to install on WampServer, you may require additional extensions that are not loaded by default. WampServer has a long list of pre-installed PHP settings and scripts for you to choose from.
Head to the WampServer tray icon, then to PHP > PHP Extensions, and make your selection.
You can customize your Apache settings from the same WampServer tray icon, such as custom and pre-installed modules, which alias you are working with, the Apache version (if you have multiple installed), and more.
One of the first MySQL changes to make is to add a password to your root account. You’re not at immediate risk because your site is local, but it is better to change this right now, so you don’t forget. And let’s face it, security is serious, and you’d be a fool not to add a password, just in case.
Head back to the WampServer tray icon. Select MySQL > MySQL console. The username is still root, and there is no password. Enter the following command:
SET PASSWORD for root@localhost=PASSWORD('yourpasswordhere')
You have now set a password for your root account.
Go Forth and WampServer!
Now you are up and running, you can really start playing around with installations, custom settings, and more. Or simply get to know MySQL, Apache, and PHP better, through trial and error. Alternatively, check out our list of the most important SQL commands for any programmer worth their salt.