What is XAMPP? Guide on How to Install XAMPP on Windows and Linux
During web application development and testing, creating a virtual server environment right on your personal computer is extremely important. XAMPP is one of the most...
During web application development and testing, creating a virtual server environment right on your personal computer is extremely important. XAMPP is one of the most popular solutions today, allowing you to quickly install components such as Apache, MySQL, PHP, and phpMyAdmin—all in a single installer.
However, not everyone knows how to install and use XAMPP effectively. Common mistakes new users frequently encounter include:
- Installed the wrong XAMPP version incompatible with the operating system.
- Port conflict caused by duplication with another application on the machine.
- Unable to start Apache or MySQL.
- Do not know how to check server operation after installation.
What is XAMPP?
XAMPP is a cross-platform web server software pre-integrated with necessary tools to build and develop websites quickly and easily right on your personal computer.The full version of XAMPP integrates 5 main software components:
- X – Represents cross-platform operating system support, such as: Windows, macOS, Linux, Solaris.
- A (Apache) – A popular open-source Web Server used to process and display website content.
- M (MariaDB) – A database management system developed from MySQL, used to store website data.
- P (PHP) – A server-side programming language that helps build dynamic websites and process data flexibly.
- P (Perl) – A programming language commonly used in system administration and building web applications
1. What Is XAMPP Used for in Web Development?
XAMPP is an excellent tool that helps create a web server environment right on your personal computer quickly and conveniently. Operating as a local web server, XAMPP efficiently supports operating systems like Windows, macOS, and Linux. The software integrates all essential components just like a real server, making it ideal for studying and developing websites.Common use cases for XAMPP:
- Test websites directly on a personal computer before deploying to live environments.
- Research, learn, and develop web applications using databases and PHP.
- Helps developers build and test projects without an Internet connection.
- Serving web development teaching and hands-on practice in educational environments.
2. XAMPP Review: Advantages and limitations
2.1 Outstanding strengths of XAMPP
- Free and open-source: You can use it at no cost and easily customize it if needed.
- Easy installation: With just a few clicks, you can install and launch a localhost server.
- Multi-platform support: Works well on Windows, macOS, Linux.
- Integrates all necessary components: Includes Apache, MySQL/MariaDB, PHP, Perl, phpMyAdmin,… without needing separate installations.
- Suitable for learning and development: Ideal for students and developers to test and build web applications.
- Run offline: No internet required, you can still develop and test websites.
2.2 A few limitations you should note
- Unsafe for production environments: Due to stripped-down security features, it should not be used as a public web server.
- Limited performance: Not suitable for high-traffic websites or resource-intensive applications.
- Configuration may confuse beginners: While simple, advanced configuration (such as enabling SSL, changing ports, creating DB users...) can sometimes be challenging for newcomers.
- No automatic updates: Users need to manually update components when new versions are released.
3. Instructions on how to install XAMPP on your computer
3.1 Install XAMPP on Windows
Step 3.1: Download XAMPP to your computer via VPTS's exclusive tool- Open the VPTS.COM - TOOL VPS tool pre-installed on your computer.
- In the main interface, locate the “Installation Support Tools” section.
- Check the XAMPP box as shown in the illustration.
- Click the “Download” button to start downloading and installing XAMPP automatically.
In addition, you can download XAMPP to your computer here:Download xampp (19 downloads)

After downloading, double-click the installation file.exe(usually named likexampp-win32-…-installer.exe) to begin the XAMPP installation process on your computer.
If the system displays a security warning, simply select "Yes" or "Allow" to continue the setup process.
Step 3.3: Configure XAMPP installation
When the setup window appears, click Next to continue.
Under Select Components, you can choose the components you wish to install, such as:
- Apache
- MySQL
- PHP
- phpMyAdmin
Click Next, then select the installation directory (recommended to keep default asC:xampp).
Keep clicking Next until the installation process begins and completes.

3.2 How to install XAMPP on Linux
Step 3.1: Download XAMPP for Linux- Visit the official XAMPP page and download the Linux version:Here

Open Terminal and run the command:
chmod +x xampp-linux-x64-8.2.12-0-installer.run
./xampp-linux-x64-8.2.12-0-installer.run

- After granting permissions to XAMPP and the program appears:
- This is the step to confirm which components you want to install. The default is yes (Y); you can press Enter directly to proceed. The installer will continue running and install XAMPP

- When the message appears:"Setup has finished installing XAMPP on your computer."
- Means you have successfully installed XAMPP

- When the installation window appears, click Next to continue.
- Follow each step until the installation process is complete.
- Click Finish to complete.
3.3 Important notes when installing XAMPP
Before proceeding with XAMPP installation, you should check and uninstall software related to localhost such as PHP, MySQL, or other localhost environments (like WAMP, Laragon...) to avoid conflicts. This helps ensure XAMPP operates stably without errors during installation.- Disable firewalls and antivirus software:
On Windows, firewalls or security software might block important ports such as port 80 (Apache) or port 3306 (MySQL), hindering XAMPP operation. Therefore, temporarily disable firewalls and antivirus software before installing.
- Disable UAC (User Account Control):Windows UAC can restrict access rights during installation. To prevent unexpected errors, you should temporarily disable UAC before installing XAMPP to ensure the software is granted sufficient system privileges.
4. Guide to using XAMPP for Windows
Step 4.1: Start localhost with XAMPPAfter completing the installation steps, open the XAMPP Control Panel. If the screen appears as shown below, it means XAMPP is ready and localhost has started successfully.
- Click Start on the Apache and MySQL lines to activate the Web Server and database management system.
- When these lines turn green (Running), you have successfully started the localhost environment.
- Config: Configure services.
- Logs: View activity logs.
- Netstat: Displays all running processes on the local computer
- Explorer: Open installation folder.
- Shell: Command-line access.
- Services: Displays all services running in the background
- Help: Provides a link to the user forum
- Quit: Close XAMPP Control Panel

After Apache starts successfully, you can place the website source code into the installation folder to access it via browser:
- On the XAMPP interface, selectExplorer -> htdocs to access
cập thư mục:C:xampphtdocs
- Create a new folder to hold your website's source code. For example:
web1
- Copy all project files into this directory.
- Then, open your browser and access:http://localhost/web1 ->Your website will be displayed at this address.
htdocsto manage multiple websites on the same localhost.
Step 4.3: Create MySQL database on localhost
To build a dynamic website, you need to create a MySQL database. Follow these steps:
Access phpMyAdmin
- Open your browser and enter the address: http://localhost/phpmyadmin
- The database management interface will appear.
- Click the Database tab on the menu bar.
- Under Create database, enter the name of the database you want to create (e.g.,
mywebsite_db).
- Select Collation as
utf8_unicode_cifor better Vietnamese language support.
- Click Create to complete.
- If the name of the database you just created appears in the left menu, it means you have created it successfully.
- You can use this database to connect to your PHP website using credentials
host,user,password,dbname.
5. Guide to using XAMPP for Linux
After successfully installing XAMPP on Linux, you can manage and start services via Terminal or the graphical interface.
Step 5.1: Start XAMPP via Command Line (Terminal)Use the following command to start XAMPP:
sudo /opt/lampp/lampp start
If starting XAMPP fails, resolve it as follows:

- Use the command to check: uname -m
- If it returns
x86_64→ 64-bit operating system (OK).
- If it returns
i386,i686→ 32-bit operating system (cannot run 64-bit XAMPP).
- Reinstall system libraries (if using 64-bit)
- For Ubuntu/Debian:
sudo apt update
sudo apt install libc6 libncurses5 libstdc++6 libx11-6 libxext6 libxtst6 libnsl-dev
- For CentOS/RHEL/AlmaLinux/Rocky:
sudo yum install glibc libX11 libXext libXtst libnsl
Or if usingdnf:
sudo dnf install glibc libX11 libXext libXtst libnsl

- After installation completes, the system asks whether you want to continue the installation?
- Please enter y -> Enter

- Interface after command execution completes

If you want to use the management interface, run the following command:
sudo /opt/lampp/manager-linux-x64.run
The management window will appear, allowing you to:
- Start / Stop / Restart individual services.
- Monitor the status of servers such as Apache, MySQL, FTP,...
- Advanced configuration with tab
Configure.
.run.
6. Verify XAMPP installation using a PHP file
To ensure XAMPP is installed correctly and running stably, you can verify it by creating and running a simple PHP file in a browser. Follow these steps:
Step 6.1: Start XAMPP- Open XAMPP Control Panel and click Start for Apache and MySQL to launch the two required services.
- Access directory
htdocsin the XAMPP installation directory. Typically the path is:
C:\xampp\htdocs
Step 6.3: Create new PHP file- Open a text editor (such as Notepad), create a new file with the extension
.php. For example:index.php.
- Paste the following simple code snippet into the file
index.php:
<!DOCTYPE html>
<html>
<head>
<title>Trang PHP đầu tiên</title>
</head>
<body>
<h1>Xin chào, đây là trang PHP đầu tiên!</h1>
<?php
echo "Xin chào, thế giới!";
?>
</body>
</html>
Save this file to folderhtdocs, for example:C:xampphtdocstentep.php.
- Open your browser and visit the path:
http://localhost/tentep.php
- If the browser displays the text:"Hello, this is the first PHP page!"
- If the browser displays the text:"Hello, this is the first PHP page!"then you have successfully installed XAMPP and the localhost environment is working properly.
7. Guide to upgrading PHP version for XAMPP
Step 7.1: Visit PHP download page- Go to page:https://www.apachefriends.org/download.html
- Click More Downloads to see more older or newer versions.

Example:
- XAMPP for Windows if you are using Windows
- XAMPP Linux if you are using Linux

In the displayed list, select the PHP version you need (e.g., 8.2.0 or 8.1.2).

Click the Download button on the corresponding row to download.

- Extract the downloaded ZIP file.
- Open the newly extracted folder and copy the entire PHP directory.
- Go to the XAMPP installation directory, following path:C:xamppphp
- Rename the old folder (e.g., php-old), then paste the new folder in.
- Create a new PHP file named
test.phpatC:xampphtdocswith content:
<?php
phpinfo();
?>
- Open your browser and navigate to:http://localhost/test.php
- If the page displays the new PHP version information, the upgrade was successful!
CONCLUSION
XAMPP is a great solution that helps you create a web development environment right on your personal computer quickly and conveniently. By integrating essential components like Apache, MySQL, PHP, and phpMyAdmin, XAMPP has become an indispensable tool for students, developers, and those beginning to learn web development.Through detailed instructions from installation, startup, and directory management to PHP upgrades, you can confidently use XAMPP to develop and test websites effectively right in your local environment.
If you are looking for a powerful, stable VPS with prompt technical support, choose VPTS – a leading reputable provider in network infrastructure, servers, and security in Vietnam.
Wishing you a successful XAMPP installation and effective website building right on localhost!
VPTS – Comprehensive Digital Infrastructure Solutions Provider
VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.
Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.
VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.
VPTS Team Contact Information
Website: https://vpts.shop
Facebook: https://www.facebook.com/trang.vpsttt/
Zalo OA: https://zalo.me/vpstttgroup
Hotline: 0328 812 674