What is WAMP?
WAMP is a Windows development environment that gives your laptop the main components needed to run PHP web applications locally: Windows, Apache, MySQL/MariaDB and PHP.
Instead of uploading every change to an internet server, you can build and
test your application directly on your own laptop using localhost.
What You Need Before You Start
- A Windows laptop or desktop computer.
- Administrator access so you can install software.
- A compatible 64-bit WAMP Server installer.
- The required Microsoft Visual C++ Redistributable packages.
- A code editor such as Visual Studio Code.
Step 1: Install the Required Visual C++ Packages
WAMP depends on Microsoft Visual C++ runtime libraries. Install the required x86 and x64 redistributable packages before installing WAMP.
- Run the x86 Visual C++ Redistributable installer.
- Complete the installation.
- Run the x64 Visual C++ Redistributable installer.
- Restart Windows if the installer requests it.
Step 2: Install WAMP Server
- Right-click the WAMP installer and choose Run as administrator.
- Accept the licence agreement.
- Use the default installation folder unless you have a specific reason to change it.
- For a standard 64-bit installation, the folder is normally
C:\wamp64. - Complete the installation and allow WAMP through Windows security prompts when required.
Step 3: Start WAMP
Start WAMP Server from the Windows Start menu or desktop shortcut. A WAMP icon should appear in the Windows system tray.
Wait for the icon to become green. A green icon normally means the Apache web server and database service are running.
Step 4: Test Localhost
Open your web browser and enter:
http://localhost/
If the WAMP home page appears, your local web server is running successfully.
http://localhost/ opens correctly and your
WAMP icon is green, the basic web server setup is working.
Step 5: Find the Web Project Folder
WAMP normally serves websites from its www directory. With a standard
installation, that is:
C:\wamp64\www
Every project folder you create inside this directory can be opened through
your browser using localhost.
Step 6: Create Your First PHP Page
Create a folder:
C:\wamp64\www\myfirstapp
Inside it, create a file called index.php containing:
<?php echo "My local web server is working!";
Now open:
http://localhost/myfirstapp/
You should see:
My local web server is working!
Step 7: Open phpMyAdmin
WAMP also gives you a browser-based database administration tool called phpMyAdmin. Open:
http://localhost/phpmyadmin/
You will use phpMyAdmin later to create databases, create tables, inspect data and run SQL commands while learning MySQL.
What You Have Achieved
You now have the foundation of a local web development environment:
- Apache can serve web pages on your laptop.
- PHP can execute server-side code.
- MySQL/MariaDB is available for application data.
- phpMyAdmin gives you a graphical database interface.
- Your projects can be developed under
C:\wamp64\www.
Common Problem: WAMP Icon Does Not Turn Green
If the WAMP icon stays orange or red, one of its services may not have started. Common causes include another program already using the web-server port, missing Visual C++ runtime packages, or a service that failed to start.
Do not continue to the application-development stage until
http://localhost/ is working correctly.
Ready to Build a Real Application?
iCode Training Solutions teaches practical web application development in Vanuatu using PHP, CodeIgniter 4, MySQL and AdminLTE.
Register Your Interest