Skip to the content.

XAMPP Installation Guide

Introduction

XAMPP (Cross-Platform Apache, MySQL, PHP, Perl) is a free and open-source cross-platform web server solution that works on Windows, macOS, and Linux. This guide covers installation on all major platforms.

System Requirements

Windows

macOS

Linux

Download XAMPP

  1. Visit the official Apache Friends website: https://www.apachefriends.org
  2. Select your operating system
  3. Download the latest stable version

Installation Steps

Windows Installation

  1. Run the downloaded installer (xampp-windows-x64-installer.exe)
  2. If prompted by UAC, click “Yes”
  3. Follow the installation wizard:
    • Select components (Apache, MySQL, PHP, phpMyAdmin recommended)
    • Choose installation directory (default: C:\xampp)
    • Deselect “Learn more about Bitnami” if not needed
  4. Complete the installation
  5. Launch XAMPP Control Panel

macOS Installation

  1. Open the downloaded DMG file
  2. Drag the XAMPP folder to the Applications folder
  3. Open Terminal and run:
    sudo chmod 755 /Applications/XAMPP/xamppfiles/xampp
    
  4. Launch XAMPP from Applications folder
  5. Enter your password when prompted

Linux Installation

  1. Open Terminal and navigate to the download directory
  2. Make the installer executable:
    chmod +x xampp-linux-x64-installer.run
    
  3. Run the installer with sudo:
    sudo ./xampp-linux-x64-installer.run
    
  4. Follow the graphical installer or command-line prompts
  5. Default installation directory: /opt/lampp

Starting XAMPP

Windows

  1. Open XAMPP Control Panel
  2. Click “Start” next to Apache
  3. Click “Start” next to MySQL
  4. Status should change to green

macOS

  1. Open XAMPP Control Panel
  2. Click “Start” on the General tab
  3. Or use Terminal:
    sudo /Applications/XAMPP/xamppfiles/xampp start
    

Linux

sudo /opt/lampp/lampp start

Testing the Installation

  1. Open your web browser
  2. Navigate to http://localhost
  3. You should see the XAMPP dashboard

Accessing phpMyAdmin

  1. Navigate to http://localhost/phpmyadmin
  2. Default credentials:
    • Username: root
    • Password: (leave empty)

Default Ports

Project Directory

Windows

C:\xampp\htdocs\

macOS

/Applications/XAMPP/xamppfiles/htdocs/

Linux

/opt/lampp/htdocs/

Security Recommendations

After installation, it’s recommended to:

  1. Set a password for the MySQL root user
  2. Configure firewall rules
  3. Disable unnecessary services

Next Steps

Additional Resources