You are here: Home » Programming & Computer » Miscellaneous » Install & Setup WampServer [Window+Apache+MySQL+PHP]

Install & Setup WampServer [Window+Apache+MySQL+PHP]


Thinking to learn PHP? Are you using Microsoft Windows Operating System? Then follow below simple steps to install and setup your PC or laptop in wamp environment to enable you start coding in PHP:-

(I) Install WampServer

Step1: Identify either you PC is 32bits or 64bits.

Step2: Download wampserver package according to your computer’s processor type that you have identified at step1.

Step3: Double click on WampServer Setup file (with extension .exe file). Basically, you just need to blindly press accept the agreement, press multiple times of Next button, Install button. Naming just let it be as been suggested to you. Choose your default browser. Check on Launch now and press finish button.

Congratulations! You have completed the installation of wampServer into your computer. Am I able to start coding using PHP now?! Sorry, not yet. You still need to identify and setup few things before you able to use it.

(II) Configure Apache Webserver: Identify whether your port 80 had been taken up or used by IIS?

open your command prompt and type: netstat -ano|findstr 80

Figure1: Showing that the port 80 had been used.

If YES: You need to apply port 8080 for Apache server since port 80 had been applied by IIS

wampServer Menu
Figure2: WampServer Menu located at taskbar.

i) Click on wamp icon and select Apache > httpd.conf

  • Look for Listen 80 and change it to Listen 8080
  • Look for ServerName localhost:80 and change it to ServerName localhost:8080

ii) Click on wamp icon and select PHP > php.ini

  • Adding in error_reporting = E_ALL & ~E_NOTICE under Error handling and logging

iii) Click on wamp icon in the task bar and select Restart All Services.
iv) Open your browser and test it by typing in the url http://locahost:8080/
WampServer Localhost index page
Figure3: If you can view this page means you have successfully setup your Apache webserver

If NO: Then skip (i) and direct proceed to (ii) until (iv) and remember to only key in url http://localhost/

Start coding! Where to save your PHP file at? Easy, save it under C:\wamp\www\ and test your php page by type in url http://localhost/phpfilename.php. Or, you can open a folder under C:\wamp\www\ (eg: webs). Test your php page by type in url http://localhost:8080/webs/phpfilename.php or http://localhost/webs/phpfilename.php.

(III) Configure MySQL: Set Admin Password

I feel more convenient to use command prompt or mysqlyoq when writing the sql script. This is how I set my admin password through command prompt:-

i) Start > Run > Type in cmd and press OK button.
ii) Locate your mysql bin folder beforehand and type in command prompt:

cd c:/wamp/bin/mysql/mysql5.1.36/bin
mysqladmin -u root password YOUR-PASSWORD-GO-HERE

Remember to press Enter key after each line of command.

Run some test to verify that your above script do take effects.

mysql -u root -p
Enter password: ********

Remember to press Enter key after each line of command.

Successful: the screen will show Welcome to the MySQL Monitor. blah blah blah…
Failure: ERROR 1045 (28000): Access denied for blah blah blah…

It is advisable to download and install SQLyoq Community Edition into your computer. This software is very convenient and user friendly for you to works with your database.



Leave a Reply

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