XAMPP
XAMPP is a free, cross-platform local development stack that bundles Apache HTTP Server, MariaDB, PHP, and Perl for building and testing web applications.
- What XAMPP Does and When to Use It
- How to Install XAMPP
- Core Concepts of XAMPP
- XAMPP Control Panel
- Apache HTTP Server in XAMPP
- MariaDB (MySQL) in XAMPP
- PHP Configuration in XAMPP
- The htdocs Document Root in XAMPP
- Common Tasks with XAMPP
- How to Start Apache and MariaDB in XAMPP
- How to Access phpMyAdmin in XAMPP
- How to Create a New Database in XAMPP
- XAMPP Troubleshooting
- Related Tools and Guides
XAMPP (cross-platform Apache, MariaDB, PHP, and Perl) is a free, open-source local development server stack that installs a complete web server environment on Windows, macOS, and Linux.
What XAMPP Does and When to Use It
XAMPP provides a single-installer bundle that sets up Apache HTTP Server, MariaDB (MySQL-compatible database), PHP, and Perl on a local machine. The XAMPP Control Panel starts and stops each service independently. Developers use XAMPP to build and test PHP-based web applications — such as WordPress, Joomla, and Drupal — without deploying to a remote server.
XAMPP stores all website files in the
htdocs folder inside its installation directory. Apache HTTP Server serves those files at
http://localhost on port 80 by default. MariaDB listens on port 3306 and provides database services through phpMyAdmin, a web-based database management interface included in XAMPP.
XAMPP is not designed for production servers. The default configuration has no database root password, exposes phpMyAdmin to the network, and disables several Apache HTTP Server security modules. For production environments, use a dedicated Apache HTTP Server or Nginx installation with hardened MariaDB settings.
How to Install XAMPP
XAMPP installs through a graphical installer on Windows and macOS. Download the installer from the Apache Friends website. The installer bundles all components — no separate downloads are required.
For a detailed walkthrough on Windows, see How to install XAMPP on Windows.
Core Concepts of XAMPP
XAMPP Control Panel
The XAMPP Control Panel is the central management interface for all XAMPP services. It displays the running status of Apache HTTP Server, MariaDB (MySQL), FileZilla FTP Server, Mercury Mail, and Tomcat. Each service has Start, Stop, Admin, Config, and Logs buttons. The Config button provides direct access to configuration files such as
httpd.conf,
php.ini, and
my.ini.
Apache HTTP Server in XAMPP
Apache HTTP Server handles all HTTP requests in XAMPP. It serves files from the
htdocs directory and processes PHP scripts through the PHP module. The main Apache configuration file is
httpd.conf, located at
C:\xampp\apache\conf\httpd.conf on Windows. Apache HTTP Server listens on port 80 (HTTP) and port 443 (HTTPS) by default.
MariaDB (MySQL) in XAMPP
XAMPP bundles MariaDB as its database server. MariaDB is a drop-in replacement for MySQL and uses the same command-line tools, including
mysql and
mysqladmin. The default MariaDB configuration file is
my.ini, located at
C:\xampp\mysql\bin\my.ini on Windows. MariaDB listens on port 3306 by default and ships with no root password in XAMPP.
PHP Configuration in XAMPP
XAMPP includes PHP as the server-side scripting language. The PHP configuration file
php.ini controls settings such as
upload_max_filesize,
max_execution_time,
error_reporting, and extension loading. On Windows, the default path is
C:\xampp\php\php.ini. Changes to
php.ini require an Apache HTTP Server restart to take effect.
The htdocs Document Root in XAMPP
The
htdocs folder is the default document root for Apache HTTP Server in XAMPP. Every file placed in
htdocs becomes accessible at
http://localhost/{filename}. On Windows, the default path is
C:\xampp\htdocs\. Subdirectories within
htdocs map to URL paths — a folder named
mysite is accessible at
http://localhost/mysite/.
Common Tasks with XAMPP
How to Start Apache and MariaDB in XAMPP
Open the XAMPP Control Panel. Click the
Startbutton next to Apache. Click the
Startbutton next to MySQL (MariaDB). Both services show green status indicators when running. Access
http://localhost in a web browser to confirm Apache HTTP Server is serving pages.
How to Access phpMyAdmin in XAMPP
Start Apache HTTP Server and MariaDB from the XAMPP Control Panel. Open a web browser and navigate to
http://localhost/phpmyadmin/. phpMyAdmin provides a web interface to create databases, manage tables, run SQL queries, and import or export data.
How to Create a New Database in XAMPP
Open phpMyAdmin at
http://localhost/phpmyadmin/. Click the
Databasestab. Enter a database name in the "Create database" field. Select the
utf8mb4_general_ci collation. Click
Create. The new database appears in the left sidebar and is ready for use by PHP applications.
XAMPP Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Apache shutdown unexpectedly | Port 80 or 443 blocked by another application (Skype, IIS, World Wide Web Publishing Service) | Full article |
| MySQL shutdown unexpectedly | Port 3306 conflict, corrupted data files, or insufficient permissions | Full article |
Related Tools and Guides
WordPress is the most common PHP application installed on XAMPP for local development. See How to install WordPress with XAMPPfor a step-by-step guide.