Complete Guide to XAMPP: Installation, Components, and Apache Server Basics
An introductory overview of XAMPP covering its components, download and installation process, control panel usage, and Apache server fundamentals for local web development.
Complete Guide to XAMPP: Installation, Components, and Apache Server Basics
1.
XAMPP Notes —Part 1 of 3
Page 1
Prepared By: Jaydeep Kale
XAMPP
Part 1 of 3: Introduction, Components, Download, Installation, Control Panel &
Apache
2.
XAMPP Notes —Part 1 of 3
Page 2
Prepared By: Jaydeep Kale
Contents of Part 1
• 1. Introduction
• 2. Components of XAMPP
• 3. Downloading XAMPP
• 4. Installing XAMPP
• 5. XAMPP Control Panel
• 6. Apache Server
3.
XAMPP Notes —Part 1 of 3
Page 3
Prepared By: Jaydeep Kale
1. Introduction
What is XAMPP?
XAMPP is a free, open-source, cross-platform software package that allows you to set up a local web server on
your own computer. It was created and is maintained by Apache Friends. The name XAMPP is an acronym that
stands for the software it bundles together: Cross-Platform, Apache, MariaDB (originally MySQL), PHP, and
Perl.
Instead of manually downloading, configuring, and connecting a web server, a database server, and a scripting
language separately (a process that can take hours and is prone to configuration errors), XAMPP installs all of
them together in one simple installer. This lets a student, developer, or hobbyist start writing and testing
PHP/MySQL-based websites within minutes of installation.
Why do we need XAMPP?
• Dynamic websites built using PHP and MySQL/MariaDB cannot simply be opened by double-clicking an
HTML file — they need a server environment to interpret PHP code and to store/retrieve data from a
database.
• Setting up Apache, PHP, and MySQL separately requires manual configuration of paths, environment
variables, and connections between the three, which is time-consuming and error-prone, especially for
beginners.
• XAMPP removes this complexity by bundling all required software together in a single, pre-configured
installer, so the server, database, and scripting engine work together right out of the box.
• It allows developers to build and test websites locally (on their own PC) before uploading them to a
live/production server on the internet.
• It is free of cost, making it ideal for students and learners who want to practice PHP/MySQL web
development without buying hosting.
Features of XAMPP
• Completely free and open-source software.
• Cross-platform — available for Windows, Linux, and macOS.
• Comes with a graphical Control Panel to start/stop services with a single click.
• Includes phpMyAdmin, a web-based tool for managing MySQL/MariaDB databases visually.
• Supports multiple scripting/programming add-ons such as PHP and Perl.
• Provides an easy way to switch Apache and MySQL ports if there is a conflict with other software.
• Portable version available, which can run from a USB drive without full installation.
• Includes additional tools such as FileZilla (FTP server), Mercury Mail, and Tomcat in some versions.
4.
XAMPP Notes —Part 1 of 3
Page 4
Prepared By: Jaydeep Kale
Advantages and Limitations
Advantages:
• Quick and easy installation — everything needed is installed in one go.
• Saves time since Apache, PHP, and MySQL/MariaDB come pre-configured to work together.
• Ideal for learning, practicing, and testing PHP-based projects locally.
• Free to download and use for personal and educational purposes.
• Large community support and documentation available online.
Limitations:
• Not recommended for production/live websites because its default configuration is not fully secure (e.g.,
default blank root password in MySQL).
• Consumes noticeable system resources (RAM/CPU) when Apache and MySQL are running together.
• Some components may be outdated compared to the latest individually-installed versions.
• Not ideal for very large-scale, high-traffic applications — dedicated servers are preferred for those.
5.
XAMPP Notes —Part 1 of 3
Page 5
Prepared By: Jaydeep Kale
2. Components of XAMPP
XAMPP is an acronym, and each letter represents one component bundled inside the software. Understanding
each component individually helps in understanding how a dynamic website actually works behind the scenes.
X – Cross Platform
The 'X' indicates that XAMPP is cross-platform, meaning it can be installed and run on different operating
systems — Windows, Linux, and macOS (as XAMPP for OS X). The same basic structure and tools are provided
in each version, although installer steps differ slightly by OS.
A – Apache Web Server
Apache is the web server software responsible for handling requests from a browser and sending back the
requested web page. When you type a URL like http://localhost/project/ in the browser, Apache receives that
request, locates the corresponding file, processes it if needed (e.g., runs PHP code), and returns the final HTML
output to the browser.
M – MariaDB (formerly MySQL)
MariaDB is the database management system used to store, organize, and retrieve data such as user information,
product details, or blog posts. Older XAMPP versions used MySQL; current versions ship with MariaDB, a
community-developed fork of MySQL that is fully compatible with MySQL commands and syntax.
P – PHP
PHP (Hypertext Preprocessor) is a server-side scripting language used to create dynamic web pages. PHP code is
embedded inside HTML and executed on the server before the final HTML is sent to the browser. It is used to
process forms, connect to databases, manage sessions, and generate dynamic content.
P – Perl
Perl is another scripting language included in XAMPP, historically used for text processing, CGI scripting, and
system administration tasks. While less commonly used today compared to PHP, it remains bundled for legacy
support and specific scripting needs.
6.
XAMPP Notes —Part 1 of 3
Page 6
Prepared By: Jaydeep Kale
3. Downloading XAMPP
System Requirements
• Operating System: Windows 7 or later, Linux (most modern distributions), or macOS.
• RAM: Minimum 1 GB (2 GB or more recommended for smooth performance).
• Disk Space: At least 1–2 GB of free space for installation and project files.
• Administrator/root access on the computer, since installation requires permission to write to system folders.
• An active internet connection is required only for the download step, not for daily usage afterward.
Downloading from the Official Website
1. Open any web browser (Chrome, Firefox, Edge, etc.).
2. Go to the official Apache Friends website: https://www.apachefriends.org
3. The homepage automatically detects your operating system and shows a large 'Download' button for the
recommended version.
4. Click the Download button. This begins downloading the installer file (an .exe file for Windows, .dmg for
macOS, or .run file for Linux).
5. Wait for the download to complete; the file size is typically around 150–170 MB depending on the version.
Selecting the Correct Version
• XAMPP versions are named according to the PHP version they bundle (for example, XAMPP for PHP
8.2.x). Choose a version that matches the PHP version required by your project or coursework.
• If you are a beginner or simply learning, it is best to choose the latest stable version listed on the download
page.
• Make sure to select the installer that matches your operating system's architecture (32-bit or 64-bit); most
modern systems use 64-bit.
• Older XAMPP versions are available under 'Other Downloads' on the website if a specific legacy PHP
version is required for compatibility with an older project.
7.
XAMPP Notes —Part 1 of 3
Page 7
Prepared By: Jaydeep Kale
4. Installing XAMPP
Installation Steps
1. Locate the downloaded installer file and double-click it to run it.
2. If Windows shows a User Account Control (UAC) prompt, click 'Yes' to allow the installer to make
changes to the system.
3. If an antivirus warning appears (common because XAMPP modifies system folders), temporarily allow it
or add an exception, then continue.
4. On the Setup wizard's welcome screen, click 'Next' to proceed.
5. Choose which components to install on the 'Select Components' screen (explained in the next section).
6. Choose the installation folder (explained below), then click 'Next'.
7. On the 'Bitnami for XAMPP' screen, you may uncheck the option (it is optional third-party software), then
click 'Next'.
8. Click 'Next' again to confirm and begin the installation process.
9. Wait for the installer to copy files and set up the components — this may take a few minutes.
10. Once complete, click 'Finish'. You may choose to launch the XAMPP Control Panel immediately by
leaving the checkbox ticked.
Choosing Installation Folder
By default, XAMPP installs to C:xampp on Windows (or /opt/lampp on Linux). It is strongly recommended to
keep the default location because many internal configuration files reference this default path. Installing into a
different drive or a folder containing spaces in its name can sometimes cause path-related errors.
Note: Avoid installing XAMPP inside 'Program Files' on Windows, as strict folder permissions there can prevent
Apache or MySQL from writing necessary files, leading to startup errors.
Selecting Components
During installation, a components screen lets you tick or untick individual parts of the package:
• Apache: The web server — this is mandatory and cannot be unchecked.
• MySQL/MariaDB: The database server — required for any project that stores data.
• PHP: The scripting engine — required to run dynamic PHP scripts.
• phpMyAdmin: A browser-based tool to manage the database visually; recommended to keep checked.
• Perl: Optional scripting language; can be left unchecked if not needed.
• FileZilla FTP Server / Mercury Mail / Tomcat: Optional extras for FTP access, email testing, and Java
servlet support respectively.
8.
XAMPP Notes —Part 1 of 3
Page 8
Prepared By: Jaydeep Kale
For basic PHP + MySQL web development (the most common use case), it is enough to keep Apache, MySQL,
PHP, and phpMyAdmin selected.
Completing Installation
After clicking 'Finish', the XAMPP Control Panel opens automatically (if the checkbox was left ticked). This
confirms that installation is complete and the software is ready to use. At this point no server is running yet —
Apache and MySQL must be started manually from the Control Panel, which is covered in the next topic.
9.
XAMPP Notes —Part 1 of 3
Page 9
Prepared By: Jaydeep Kale
5. XAMPP Control Panel
Introduction to Control Panel
The XAMPP Control Panel is a graphical dashboard that lets you manage all the bundled services (Apache,
MySQL, FileZilla, Mercury, Tomcat) from one place. It can be opened at any time from the Start Menu
(Windows) by searching 'XAMPP Control Panel', or by running xampp-control.exe directly from the installation
folder.
Start and Stop Services
Each service listed in the Control Panel (Apache, MySQL, etc.) has its own 'Start' and 'Stop' buttons on the right-
hand side of its row.
1. To start Apache, click the 'Start' button next to the Apache row.
2. To start the database server, click the 'Start' button next to the MySQL row.
3. Once a service starts successfully, its row is highlighted in green and the button label changes to 'Stop'.
4. To stop a running service, click the 'Stop' button; the row returns to its default (unhighlighted) state.
Service Status
The Control Panel provides a visual indicator for each module's current state:
• Green background/highlight = service is running successfully.
• No highlight (default grey) = service is stopped.
• Red/orange highlight or an error popup = service failed to start (commonly due to a port conflict, discussed
in Topic 15).
• A PID (Process ID) and Port number are also displayed next to each running module for reference.
Running as Administrator
On Windows, it is recommended to run the XAMPP Control Panel 'As Administrator', especially since Apache
uses port 80, which is a privileged port that sometimes requires elevated permissions.
1. Right-click on the XAMPP Control Panel icon/shortcut.
2. Select 'Run as administrator' from the context menu.
3. Click 'Yes' on the UAC prompt if it appears.
Note: If Apache or MySQL modules fail to start with a permissions-related error, running the Control Panel as
Administrator often resolves the issue.
Config Button
10.
XAMPP Notes —Part 1 of 3
Page 10
Prepared By: Jaydeep Kale
Each service row has a 'Config' button (a small gear or dropdown icon) that provides quick access to that service's
important configuration files, such as httpd.conf for Apache or my.ini for MySQL, without needing to browse to
the installation folder manually.
Logs Button
The 'Logs' button opens the log files associated with a service. These logs record startup messages, warnings, and
errors, and are the first place to check when a service fails to start or a website is not behaving as expected.
11.
XAMPP Notes —Part 1 of 3
Page 11
Prepared By: Jaydeep Kale
6. Apache Server
What is Apache?
Apache HTTP Server is free, open-source web server software responsible for accepting requests from web
browsers (clients) and returning the appropriate response — usually an HTML page, an image, or the output of a
processed PHP script. It is one of the most widely used web servers in the world.
Starting Apache
1. Open the XAMPP Control Panel.
2. Locate the 'Apache' row.
3. Click the 'Start' button next to it.
4. Wait a few seconds; the row turns green and shows 'Running' along with its PID and Port numbers once
successful.
5. Open a browser and type http://localhost/ to confirm Apache is serving pages correctly — the XAMPP
welcome/dashboard page should appear.
Default Port (80)
By default, Apache listens for web requests on Port 80, the standard HTTP port. This is why typing just
http://localhost/ (without specifying a port number) works — the browser assumes port 80 automatically for
HTTP requests.
Note: Apache also commonly uses Port 443 for HTTPS (secure/encrypted) traffic when SSL is configured.
Apache Configuration Basics
Apache's behavior is controlled by its main configuration file, httpd.conf, located inside the apache/conf folder of
the XAMPP directory. Common settings adjusted here include:
• Listen — defines which port Apache listens on.
• DocumentRoot — defines which folder is treated as the website's root directory (by default, the htdocs
folder).
• ServerName — defines the server's hostname, often set to localhost.
• Directory permissions — control whether folder browsing, .htaccess overrides, etc. are allowed.
After editing httpd.conf, Apache must be stopped and started again from the Control Panel for the changes to take
effect.
12.
XAMPP Notes —Part 1 of 3
Page 12
Prepared By: Jaydeep Kale
Common Apache Errors
Error Typical Cause / Fix
Apache shuts down unexpectedly Port 80 is already used by another program (e.g., Skype,
IIS).
"Port 80 in use" message Another web server or application is occupying port 80;
either close it or change Apache's port.
Blank white page in browser A PHP syntax error in the script; check the error logs for
details.
403 Forbidden Incorrect folder permissions or a missing index file in
the requested directory.
404 Not Found The requested file/folder does not exist inside htdocs, or
the URL is misspelled.