MeshWorld India LogoMeshWorld.

Install XAMPP on Ubuntu

(Updated: Mar 11, 2026)
Listen to ArticleAI Speech
~2 min read narration
100%
Install XAMPP on Ubuntu

XAMPP is still a familiar option for people who want a quick local PHP stack without assembling Apache, MariaDB, and PHP one package at a time.

On Linux, XAMPP is installed from the official Apache Friends installer rather than from Ubuntu’s main package repositories.

If you searched for install XAMPP on Ubuntu, XAMPP Ubuntu setup, or run XAMPP on Linux, this guide is aimed at that workflow.

Official source:

Download the XAMPP installer

Go to the Apache Friends download page and grab the Linux installer for the version you want.

The file usually looks like this:

xampp-linux-x64-<version>-installer.run

Make the installer executable

Move into the directory where the installer was downloaded, then run:

chmod 755 xampp-linux-*-installer.run

Run the installer

sudo ./xampp-linux-*-installer.run

This opens the installer wizard. By default, XAMPP is installed under:

/opt/lampp

Start, stop, and restart XAMPP

sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo /opt/lampp/lampp restart

Open the XAMPP manager

If you prefer a GUI:

sudo /opt/lampp/manager-linux-x64.run

Verify the installation

After starting XAMPP, open:

http://localhost

If the XAMPP dashboard loads, the install is working.

You can also confirm Apache is responding locally by visiting:

http://127.0.0.1

Common note about permissions

Because XAMPP lives under /opt/lampp, some operations require sudo. That is normal for this installer-based setup. If you want a stack that feels more native to Ubuntu packaging, a Docker setup or a regular LAMP install may be a better long-term fit.

Remove XAMPP

sudo /opt/lampp/uninstall

If your version does not include that script, stop the stack first and then remove /opt/lampp manually.

Final note

XAMPP is convenient, but many Linux developers eventually move to Docker or a more native LAMP setup. If you want the quickest path to a working local PHP stack, though, XAMPP still does the job.

Reader Quality Feedback

Did this technical guide help solve your problem?

Suggest Errata ($0)
Vishnu
Primary Author

Vishnu

Founder & Principal Architect at MeshWorld. Senior engineer and instructor specializing in AI agent systems, scalable web architecture, and modern development workflows.

Explore Author Archive
Compute Fuel & Open Testbed
100% Independent & Verified

Fuel High-Density, Zero-Fluff Engineering Deep-Dives

Every guide on MeshWorld is validated on physical Linux nodes and reproducible testbeds. If this article saved you hours of debugging or unblocked production, consider funding our next cluster run.

Weekly Dispatch

Join MeshWorld Dispatch

Get practical tutorials, system blueprints, and curated AI engineering notes straight to your inbox. No fluff, zero spam.

Zero spam. 1-click unsubscribe anytime.Prefer RSS?
Curated Continuations

Up Next in This Domain.

Browse Full Archive