Your Cart

Loading cart...

Complete Guide to WAMP Server on Windows

WAMP Server is one of the most reliable tools for running PHP and MySQL websites locally on Windows. This guide explains everything from installation to running WAMP as a Windows service, fixing Apache issues, enabling LAN access, and securing your local server.


1. How to Run WAMP Server as a Windows Service

Running WAMP as a Windows service allows Apache and MySQL to start automatically when the computer boots. This is ideal for LAN servers and background usage.

WAMP installs the following services:

To enable auto-start, set these services to automatic startup using Administrator Command Prompt:

sc config wampapache64 start= auto
sc config wampmysqld64 start= auto
sc config wampmariadb64 start= auto

This allows WAMP to run without user login and without the tray icon.


2. Fix Apache Port 80 Issues in WAMP

Apache may fail to start if port 80 is already in use. Common causes include IIS, Skype, Docker, or other web servers.

To check port usage:

netstat -ano | findstr :80

If another service is using port 80, stop or disable it. In most cases, IIS should be disabled on Windows.

Ensure Apache is configured to listen on port 80:

Listen 80

3. How to Access WAMP Website from LAN Devices

WAMP websites can be accessed from other devices on the same network using the system’s local IP address.

Example: as your PC LAN IP

http://192.168.29.187

To use domain-like names such as your-site.in, add entries to the hosts file:

192.168.29.187   your-site.in

Apache VirtualHosts must allow LAN access using:

Require all granted

4. WAMP vs XAMPP: Which Is Better for Windows?

Both WAMP and XAMPP provide local server environments, but WAMP is optimized specifically for Windows.

FeatureWAMPXAMPP
Windows IntegrationExcellentAverage
Service ControlNative Windows servicesManual
PHP Version SwitchingEasyLimited
Production-like SetupYesNo

For Windows-based PHP development, WAMP is usually the better choice.


5. Common WAMP Server Errors and Solutions

Most issues can be diagnosed using:

httpd.exe -t
httpd.exe -S

6. How to Host a PHP Website Locally Using WAMP

All PHP websites should be placed inside the www directory.

C:\wamp64\www\your-site\

Access it via browser:

http://localhost/your-site

For clean URLs and multi-site setups, Apache VirtualHosts are recommended.


7. Secure Your Local WAMP Server on Windows

Security is important even for local servers. Recommended practices include:

Apache root directory should always be locked:

<Directory />
    Require all denied
</Directory>

8. Best Folder Structure for PHP Projects in WAMP

A clean structure improves maintainability and security.

/your-site
 ├─ blog
 ├─ includes
 │   ├─ header.php
 │   ├─ footer.php
 │   └─ config.php
 ├─ assets
 │   ├─ css
 │   └─ js
 └─ index.php

Keeping shared files inside includes prevents duplication and simplifies updates.


Conclusion

WAMP Server is a powerful and reliable solution for running PHP websites on Windows. With correct configuration, it can operate continuously as a background server, support LAN access, and closely mimic a production environment.

By following the practices in this guide, you can build secure, maintainable, and scalable PHP projects using WAMP.

💬