What is XAMPP / LAMPP and How to Use XAMPP

11/7/2025

XAMPP and LAMPP local server setup for PHP development on localhost

Go Back

What is XAMPP / LAMPP and How to Use XAMPP / LAMPP in PHP Tutorial

Introduction

To start PHP development locally on your system, setting up a server environment is required. Tools like XAMPP and LAMPP help you run PHP, MySQL, Apache, phpMyAdmin and more — locally — without any complex installation steps.

In this tutorial, we will understand:

  • What is XAMPP?

  • What is LAMPP?

  • How to install and use XAMPP / LAMPP for PHP development


 XAMPP and LAMPP local server setup for PHP development on localhost

What is XAMPP?

XAMPP is a free and open-source cross-platform web server solution. The acronym stands for:

  • X = Cross Platform

  • A = Apache (Web server)

  • M = MySQL / MariaDB (Database)

  • P = PHP (Scripting Language)

  • P = Perl

It provides a ready-to-use environment to write and run PHP projects on Windows, Linux and macOS.

Why Developers use XAMPP?

  • No manual configuration required

  • All server components in one package

  • Best suited for beginners


What is LAMPP?

LAMPP is basically XAMPP for Linux. Earlier it was called LAMPP but now XAMPP supports all platforms. But many Linux developers still call it LAMPP.

So practically:

  • XAMPP = Windows, Linux, Mac

  • LAMPP = Linux version of XAMPP


How to Install XAMPP

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

  2. Install it with default settings

  3. Open XAMPP Control Panel

  4. Start Apache and MySQL services


How to Use XAMPP / LAMPP for PHP

Step 1: Go to htdocs folder

In XAMPP installation directory, open:

xampp/htdocs

This folder is the root directory where PHP files should be placed.

Step 2: Create a PHP file

Create a file called test.php inside htdocs:

<?php
   echo "Hello from PHP!";
?>

Step 3: Run PHP program

Open browser and type:

http://localhost/test.php

You will see output:

Hello from PHP!

Using phpMyAdmin in XAMPP

If you wish to install WordPress locally, you'll need a few essential components. These include database management software like MySQL, programming languages like Perl and PHP, and web server software like Apache. However, installing each of these components independently is challenging and time-consuming.

  • Start MySQL in XAMPP Control panel

  • Open browser and type:

http://localhost/phpmyadmin

Here you can create databases, tables and manage them easily.

  • XAMPP should never be uploaded to a production server.
  • Only use it for local development.
  • Don't forget to terminate services while not in use.

 

Conclusion

XAMPP / LAMPP are the easiest tools to start PHP learning. With just one installation, you get full server stack on your local computer. Beginners can quickly write, test and run PHP scripts without any complex configuration.

This is why most PHP developers prefer XAMPP in their early learning phase because it is fast, easy, and developer friendly.