Setup & Run XAMPP Server
Contents
Introduction
XAMPP is a free, open-source cross-platform web server solution that provides an easy way to set up a local development environment. This guide will walk you through installation and setup on:
- Linux
- Windows
- macOS
Linux
Arch Linux
- Installation - Enable AUR (Arch User Repository) if not already enabled
- Install using an AUR helper:yay -S xampp
- Accept default options during installation
 
Setup and Configuration
- Add XAMPP to your PATH:echo 'export PATH="$PATH:/opt/lampp"' >> ~/.bashrc source ~/.bashrc
- Start XAMPP:sudo /opt/lampp/lampp start
Using XAMPP
- Start/Stop services: - sudo /opt/lampp/lampp start # Start all services sudo /opt/lampp/lampp stop # Stop all services
- Test installation by visiting http://localhost 
- Create PHP project: - sudo nano /opt/lampp/htdocs/test.php- Add: - <?php echo "Hello from Arch Linux!"; ?>
- Access phpMyAdmin at http://localhost/phpmyadmin 
Ubuntu
Installation
- Download the latest installer(may vary time by time): - wget https://downloadsapachefriends.global.ssl.fastly.net/xampp-files/8.2.4/xampp-linux-x64-8.2.4-0-installer.run
- Make executable and install: - chmod +x xampp-linux-*-installer.run sudo ./xampp-linux-*-installer.run
Using XAMPP
Same as Arch Linux commands. Web root directory: /opt/lampp/htdocs
Windows
Installation
- Download installer from https://www.apachefriends.org
- Run .exefile
- Disable any antivirus temporarily if needed
- Follow installer wizard (keep default components)
Setup and Configuration
- Launch “XAMPP Control Panel” from Start menu
- Configure firewall to allow Apache/MySQL
Using XAMPP
- Start Apache and MySQL from Control Panel
- Test with http://localhost
- Web root directory: C:\xampp\htdocs
- Create database:- Access phpMyAdmin at http://localhost/phpmyadmin
- Use root/blank password initially
- Click “New” to create database
 
macOS
Installation
- Download .dmg from https://www.apachefriends.org
- Double-click image and drag XAMPP to Applications
- Open from Applications folder
Setup and Configuration
- First run:sudo /Applications/XAMPP/bin/start
- Enable automatic start:- Use “Manager-OSX” in Applications/XAMPP folder
 
Using XAMPP
- Start/Stop services via Manager-OSX GUI
- Web root directory: /Applications/XAMPP/htdocs
- Secure MySQL:sudo /Applications/XAMPP/xamppfiles/xampp security
Securing Your Installation
- Set MySQL root password
- Change phpMyAdmin authentication
- Use strong credentials for production-like environments
Troubleshooting
Port Conflicts
- Check running services: - sudo netstat -tulpn | grep ':80'
- Change XAMPP ports in configuration files if needed 
Permission Issues (Linux/macOS)
- Ensure proper ownership:sudo chown -R $USER /opt/lampp/htdocs
Windows Specific Issues
- Disable IIS/Skype if port 80 conflicts 
- Run Control Panel as Administrator - Now, we can successfully run XAMPP server locally…