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
- Windows 7 or later
- At least 2GB of RAM
- 1GB of free disk space
- Administrator privileges
macOS
- macOS 10.9 or later
- At least 2GB of RAM
- 1GB of free disk space
- Administrator access
Linux
- Ubuntu, Debian, Fedora, or other major distributions
- At least 2GB of RAM
- 1GB of free disk space
- Root access
Download XAMPP
- Visit the official Apache Friends website: https://www.apachefriends.org
- Select your operating system
- Download the latest stable version
Installation Steps
Windows Installation
- Run the downloaded installer (
xampp-windows-x64-installer.exe) - If prompted by UAC, click “Yes”
- 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
- Complete the installation
- Launch XAMPP Control Panel
macOS Installation
- Open the downloaded DMG file
- Drag the XAMPP folder to the Applications folder
- Open Terminal and run:
sudo chmod 755 /Applications/XAMPP/xamppfiles/xampp - Launch XAMPP from Applications folder
- Enter your password when prompted
Linux Installation
- Open Terminal and navigate to the download directory
- Make the installer executable:
chmod +x xampp-linux-x64-installer.run - Run the installer with sudo:
sudo ./xampp-linux-x64-installer.run - Follow the graphical installer or command-line prompts
- Default installation directory:
/opt/lampp
Starting XAMPP
Windows
- Open XAMPP Control Panel
- Click “Start” next to Apache
- Click “Start” next to MySQL
- Status should change to green
macOS
- Open XAMPP Control Panel
- Click “Start” on the General tab
- Or use Terminal:
sudo /Applications/XAMPP/xamppfiles/xampp start
Linux
sudo /opt/lampp/lampp start
Testing the Installation
- Open your web browser
- Navigate to
http://localhost - You should see the XAMPP dashboard
Accessing phpMyAdmin
- Navigate to
http://localhost/phpmyadmin - Default credentials:
- Username:
root - Password: (leave empty)
- Username:
Default Ports
- Apache: 80 (HTTP), 443 (HTTPS)
- MySQL: 3306
- FileZilla FTP: 21
- Mercury Mail: 25
Project Directory
Windows
C:\xampp\htdocs\
macOS
/Applications/XAMPP/xamppfiles/htdocs/
Linux
/opt/lampp/htdocs/
Security Recommendations
After installation, it’s recommended to:
- Set a password for the MySQL root user
- Configure firewall rules
- Disable unnecessary services