π XAMPP Essentials for Web Frontend local dev & testing
Tags: Apache, MySql, XAMPP Linux Installation
π― Purpose
XAMPP is a cross-platform package bundling Apache, MariaDB/MySQL, PHP, and Perl, designed to quickly set up a web local development environment.
π± Origin
XAMPP was released on September 2002 by the non-profit project Apache Friends. The name is an acronym for itΒ΄s components: X (Cross-platform), A (Apache), M (MariaDB), P (PHP), and P (Perl).
π§ Essentials
π XAMPP Key Components

- Apache β Web server
- Default Port: 80 (HTTP) / 443 (HTTPS)
- Browser Access: http://localhost/project-name
- MariaDB/MySQL β Database
- Default Port: 3306
- Browser Access: http://localhost/phpmyadmin
- PHP & PhpMyAdmin β Server-side scripting & DB management UI
- Perl β Perl Interpreter
π Workflow
- Install
- Start services
- Place files in
htdocs - Test in browser
- Manage DB in phpMyAdmin
- Adjust config if needed.
βοΈ Linux Installation
# Download linux installer "xampp-linux-x64-<version>-installer.run" from official website: https://www.apachefriends.org/download.html
sudo chmod +x xampp-linux-x64-<version>-installer.run
sudo ./xampp-linux-x64-<version>-installer.run
# Optional
# Avoid sudo for edits during development
sudo chown -R $USER:$USER /opt/lampp/htdocs
# Firewall config to open HTTP/HTTPS for remote access
sudo ufw status verbose # check status
sudo ufw allow 80/tcp # Allow HTTP
sudo ufw allow 443/tcp # Allow HTTPS
βΆοΈ Linux Basic Commands
sudo /opt/lampp/manager-linux-x64.run # Open XAMPP GUI
sudo /opt/lampp/lampp start # Start all services
sudo /opt/lampp/lampp stop # Stop all services
sudo /opt/lampp/lampp restart # Restart all
π Linux Key Paths
- XAMPP root:
/opt/lampp/ - htdocs (web root):
/opt/lampp/htdocs/ - php.ini:
/opt/lampp/etc/php.ini - Apache config:
/opt/lampp/etc/httpd.conf - Virtual hosts config:
/opt/lampp/etc/extra/httpd-vhosts.conf - MariaDB config:
/opt/lampp/etc/my.cnf - Error logs:
/opt/lampp/logs/error_log
π§ͺ Quick Test
Create file info.php in /opt/lampp/htdocs/ with following content:
<?php phpinfo(); ?>
Visit: http://localhost/info.php
π‘ Common Tips
- Run XAMPP as non-root in dev environments only.
- Change default MySQL root password in phpMyAdmin for security.
- Use virtual hosts for multiple projects:
- Restart Apache after config changes.
π§° Troubleshooting
- Port 80 in use? Change Apache port in
httpd.conf. - MySQL not starting? Check
/opt/lampp/var/mysql/*.err.
All cheat sheets are taken from our Udemy Online Course. Interested? Check out:
All-In-One Full Stack DevOps - From Idea to Cloud