PHP – Installing XAMPP Server

🔹 1. Begin with a Clear Introduction

“Before we can write and run PHP code, we need a local server. That’s where XAMPP comes in.”

  • Explain what XAMPP is:

    A free and open-source cross-platform package that includes Apache (web server), MySQL (database), PHP, and Perl.


🔹 2. Explain Why We Use XAMPP

  • It allows developers to run a local server for testing without internet.

  • Bundles everything in one installer—Apache + MySQL + PHP—saves time.

  • Cross-platform (Windows, Linux, macOS).


🔹 3. Walkthrough of the Installation Steps

You can share your screen or give step-by-step visuals.

✅ Step-by-Step:

  1. Download XAMPP from https://www.apachefriends.org

  2. Choose your OS and architecture (Windows 64-bit).

  3. Run the installer as administrator.

  4. During setup:

    • Select components: Apache, MySQL, PHP (others are optional).

    • Choose install directory: C:\xampp

  5. Complete installation and launch the XAMPP Control Panel.

“If Windows Defender shows a warning, allow access so Apache can run.”


🔹 4. Start the Server

  • Open the XAMPP Control Panel

  • Start Apache (PHP server) and MySQL (database)

  • Look for green ‘Running’ indicators

Test Your PHP Installation

  1. Go to C:\xampp\htdocs

  2. Create a new file: test.php

  3. Add this code:

     

    <?php echo "Hello, PHP is working!"; ?>
     

    Open your browser and visit:

    http://localhost/test.php

“If you see ‘Hello, PHP is working!’, your setup is successful!”

Scroll to Top