What Is XAMPP and How Do You Set Up a Local Apache, PHP, and MariaDB Environment?

XAMPP is a free, open-source distribution that bundles Apache, MariaDB, PHP, and Perl into a single installer, so you can run a complete local web server without configuring each component separately. It's the right choice when you want to build or test PHP applications on your own machine—not for hosting a live site. This guide covers what's inside the package, how to pick the correct installer for Windows, Linux, or macOS, and how to get Apache and MySQL running and verified on localhost.

What XAMPP Actually Bundles

According to Apache Friends, the non-profit project behind XAMPP, the package contains four components:

Component Role
Apache The web server that handles HTTP requests
MariaDB The database (a drop-in compatible fork of MySQL)
PHP The server-side scripting language
Perl A general-purpose scripting language

The value of the bundle is that these pieces are pre-configured to work together. Installing Apache alone gives you a web server but no way to execute PHP or store data; you'd then need to install and wire up PHP, a database, and their connectors yourself. XAMPP skips that integration work, which is why the project describes it as "incredibly easy to install and to use."

When a Bundled Stack Makes Sense

Choose XAMPP when you want to:

  • Develop or debug PHP applications locally
  • Learn Apache/PHP/database basics without managing separate installs
  • Test code against a specific PHP version

Consider installing components individually when you need a production-grade configuration, precise control over each service, or a stack that mirrors a specific server environment.

Downloading the Right Installer

XAMPP provides separate installers per operating system. From the Apache Friends download page, the current versions listed are:

  • Windows: XAMPP 8.2.12 (PHP 8.2.12)
  • Linux: XAMPP 8.2.12 (PHP 8.2.12)
  • macOS (OS X): XAMPP 8.2.4 (PHP 8.2.4)

The download page also links to other versions, and release notes indicate that Windows builds for PHP 8.2.12, 8.1.25, and 8.0.30 were published together, with Linux and macOS versions following. If your project targets a specific PHP version, check the "other versions" link rather than assuming the default matches your needs.

First-Run Steps

  1. Install the package for your OS using the downloaded installer.
  2. Open the XAMPP Control Panel—this is the interface for starting and stopping services.
  3. Start Apache by clicking its Start button. This launches the web server.
  4. Start MySQL (MariaDB) the same way if your application needs a database.
  5. Verify by opening a browser and navigating to localhost or http://localhost. A working Apache instance serves the XAMPP welcome/dashboard page.

The expected result: the control panel shows Apache (and MySQL, if started) as running, and the browser displays the XAMPP start page rather than a connection error.

Common Setup Problems

Port 80 or 443 Already in Use

Apache's default ports are 80 (HTTP) and 443 (HTTPS). If another service—such as IIS, Skype, or another web server—has claimed them, Apache will fail to start. Resolve this by either stopping the conflicting service or changing Apache's listening ports in its configuration, then restarting Apache and accessing the site on the new port.

MySQL Won't Start

A database service already running on the same port (commonly 3306) will block MariaDB from starting. Stop the other database service or change the port in XAMPP's configuration.

Services Start but the Page Doesn't Load

Confirm you're using the correct port in the URL, and check that no firewall is blocking the connection to localhost.

XAMPP Is for Local Development, Not Production

The Apache Friends project positions XAMPP as a development environment. Its default configuration prioritizes ease of setup over the hardening a public-facing server requires. Use it to build and test locally, then deploy to a properly configured production environment.

apachefriends.org
XAMPP is an easy to install Apache distribution containing MariaDB, PHP and Perl.
superset.apache.org
Community website for Apache Superset™, a data visualization and data exploration platform
tomee.apache.org
Apache TomEE is a lightweight, yet powerful, JavaEE Application server with feature rich tooling.