ADVERTISEMENT
ADVERTISEMENT

PHP Installation on Windows Using WAMP Server

This tutorial will guide you through installing PHP on Windows using the WAMP server. WAMP stands for Windows, Apache, MySQL, and PHP. WAMP makes it easy to set up a local server on your Windows computer to develop and test PHP applications.

Step 1: Download WAMP Server

Step 2: Install WAMP Server

Step 3: Start and Configure WAMP Server

Step 4: Test PHP Installation

Step 1: Download WAMP Server

  1. Open your web browser.
  2. Visit the official WAMP server website.
  3. Click on the Download link for the latest version.
  4. Choose the correct version for your Windows system (32-bit or 64-bit).
  5. Save the installer file to your computer.
  6. Click Here to Download Microsoft VC packages

Step 2: Install WAMP Server

  1. Locate the downloaded installer file (for example, wampserver-x.x.x.exe).
  2. Double-click the installer to run it.
  3. Follow the on-screen instructions:
    • License Agreement: Read and accept the license agreement.
    • Installation Folder: Choose a folder (the default is usually C:wamp or C:wamp64 for 64-bit systems). It is best to use the default location.
    • Additional Requirements: The installer might check for required software (such as Microsoft Visual C++ Redistributable packages). If prompted, download and install the missing components.
  4. Once the installation is complete, you may be asked to choose your default browser and text editor. You can keep the defaults or select your preferred applications.
  5. Click Finish to complete the installation.

Step 3: Start and Configure WAMP Server

  1. Launch WAMP Server:
    • After installation, launch WAMP Server by clicking its desktop icon or finding it in the Start Menu.
  2. Check the WAMP Icon:
    • Look at the WAMP server icon in the system tray (located in the bottom-right corner of your screen).
    • When WAMP Server is running correctly, the icon will be green. If it’s red or orange, it indicates that not all services have started properly.
  3. Access the WAMP Dashboard:
    • Left-click the WAMP icon in the system tray.
    • Select Localhost from the menu, or open your web browser and type http://localhost/ in the address bar.
    • You should see the WAMP server homepage, which confirms that Apache and MySQL are working.

Step 4: Test PHP Installation

  1. Create a PHP Info File:
    • Navigate to the www directory inside your WAMP installation folder. By default, this is located at:
    • Create a new file named info.php using a text editor (such as Notepad or the text editor you selected during installation).
  2. Add PHP Code:
    • Open info.php and add the following code:
      <?php 
      
      phpinfo();
       
      ?> 

       

  3. Save the File and close the text editor.
  4. View in Browser:
    • Open your web browser and go to: http://localhost/info.php 
    • You should see a page displaying detailed information about your PHP installation, including the PHP version, configuration settings, and loaded modules.

 


ADVERTISEMENT

ADVERTISEMENT