Blog/Development

A Step-By-Step Guide on How to Install Xampp on Windows, macOS, Linux With Screenshots

Share:

Facebook
Twitter
Linkedin
Copy link
Copy Link

author

Toluwani Folayan

June 23, 2023

A Step-By-Step Guide on How to Install Xampp on Windows, macOS, Linux With Screenshots

As a developer, you are likely familiar with XAMPP. If you aren't, XAMPP is a software package that enables you to build a web server on your computer. It combines all the necessary technologies, such as an Apache web server, a MySQL database server, and PHP, into one convenient package. 

XAMPP is an essential software every developer needs to know how to install, especially if they want to create and test web applications or websites offline before going live. In addition, it enables you to experience the intriguing world of web development from your PC, streamlines the setup procedure, and improves learning opportunities.

Now that we have covered some essential benefits of installing XAMP on your PC, we can imagine how eager you must be to learn how to install this application suite on your system. Well, if you are, this article is absolutely for you! 

We have streamlined and simplified the process of installing XAMPP, and this article is here to guide you through every step. Whether you're a beginner or an experienced developer, our comprehensive guide will take you through the installation process in detail (with pictures), ensuring that you have a smooth and hassle-free experience. We understand the importance of clarity and simplicity in technical installations and crafted this article with that in mind.

Let's get started! 


What you will learn:

What is XAMPP?

Components of XAMPP

A step-by-step guide on how to install XAMPP on your personal computer

How to Install XAMPP on Windows

How to Install XAMPP on macOS

How to install XAMPP on Linux

First, we start with the basics. What is XAMPP?


What is XAMPP?

XAMPP is a software package that allows you to create a web server on your computer. It brings together all the necessary tools like a web server (Apache), a database server (MySQL), and a scripting language (PHP) in one easy-to-use package. 

Each letter in the name stands for one of the five essential elements. X represents the operating system it supports: Linux, Windows, and Mac OS X. A stands for the Apache web server, and M represents the relational database management system, usually MySQL or MariaDB. The two Ps stand for the PHP and Perl scripting languages.

XAMPP is the most well-known software package to set up a PHP development environment for online services because it contains all the essential software components.

Speaking of components, read the subsequent heading to find out the software components of XAMPP.  


Components of XAMPP

XAMPP is a collection of software components that, when combined, form a complete web server environment. The main software components of XAMPP are:


1. Apache

 Apache is a popularly used open-source web server software. It serves as the foundation of XAMPP, managing HTTP requests and providing clients with web pages. The Apache Software Foundation offers the server program free software for all users.


2. MySQL

Relational database management system (RDBMS) MySQL is a well-known open-source RDBMS. It offers web applications a stable and effective means of managing and storing data.

Although XAMPP includes one of the world's most widely used relational database management systems, MySQL has been superseded in recent XAMPP versions by MariaDB (a community-developed derivative of the MySQL project created by the original developers). 

Also, MySQL provides data storage for web services when used with the web server Apache and the programming language PHP. 


3. PHP

PHP (Hypertext Preprocessor) is a powerful server-side scripting language. It facilitates the creation of dynamic web pages and allows you to insert HTML code to produce interactive and dynamic online applications.

All platforms can be used to install PHP because it supports a wide range of different database systems.


4. Perl

Perl is a universal programming language for web development and system administration tasks. It is included in XAMPP to provide additional flexibility for developers.

Perl is a high-level programming language created for text editing that can be used for network programming and web development.


5. phpMyAdmin

phpMyAdmin is a web-based tool used for managing MySQL databases. It offers a simple user interface for building databases, managing tables, running SQL queries, and more.


6. FileZilla FTP Server (optional)

XAMPP also offers an optional component called FileZilla FTP ServerIt. It enables you to set up an FTP server (File Transfer Protocol), making moving files from your computer to a remote server easier.


A Step-By-Step Guide on How to Install Xampp on Your Personal Computer

The steps for installing XAMP on Windows may vary slightly from those on macOS and Linux. Therefore, we will explain the steps for installation on each operating system.


How to Install XAMPP on Windows

Step One: Download XAMPP

Open your web browser and visit the official XAMPP website (https://www.apachefriends.org/index.html ).

On the website, you will see the XAMPP download section. Look for the version of XAMPP compatible with Windows and click on the "Download" button.


Step two: Begin the installation process

To begin the installation, find the downloaded XAMPP installer file (for example, "xampp-win32-7.4.21-0-VC15-installer.exe") and double-click on it.

If a security warning pops up, choose "Run" or "Yes" to continue.


Step three: Select Components

A setup wizard for XAMPP will launch. To start the installation procedure, select "Next".

You'll see a list of installation-ready components. The default configuration includes Apache, MySQL, PHP, and phpMyAdmin. Leave these options checked unless you have specific requirements.

Click "Next" to proceed.


Step four: Select an Installation folder

Choose the destination folder where you wish to install XAMPP. The default location is usually "C:\xampp". You can retain this or select a different folder.

Click "Next" to continue.


Step Five: Install XAMPP

The setup wizard will summarise the installation settings. Review the information and click "Next" to start the installation.

Wait for the installation process to complete. This may take a few minutes.

Once the installation is finished, you will see a screen with "Learn more about Bitnami for XAMPP" checkboxes and "Do you want to start the Control Panel now?". Leave both options checked.

Click "Finish" to exit the installer.


Step Six: Start your Xampp Controller

The XAMPP Control Panel will open automatically after installation. If it doesn't, navigate to the XAMPP installation directory (e.g., "C:\xampp") and run "xampp-control.exe".

In the XAMPP Control Panel, you will see a list of modules such as Apache, MySQL, and FileZilla (optional). These modules represent the services provided by XAMPP.

To start a module, click the "Start" button next to it. The status indicator will turn from red to green once the module is running.


Step seven: Verify the installation

Open your web browser and type "http://localhost" in the address bar.

If XAMPP runs correctly, you should see the XAMPP welcome page or the XAMPP dashboard.


Congratulations! Your Windows operating system now runs XAMPP with no problems. Now that you have a local web server environment, you can start developing and testing websites.

Pro tip: Add your website files under the XAMPP installation directory's "htdocs" folder (for example, "C:xampphtdocs") so that you can access your projects by going to "http://localhost/your-project-folder" in your browser.

To save system resources while not using XAMPP, don't forget to stop the services from the XAMPP Control Panel. You can start the services again whenever you need them.


How to Install XAMPP on macOS

Step one: Download XAMPP

Open your web browser and visit the official XAMPP website (https://www.apachefriends.org/index.html ).

On the website, you will find the XAMPP download section. Look for the version of XAMPP compatible with macOS and click the "Download" button.


Step two: Start the installation process

Locate the downloaded XAMPP installer file (e.g., "xampp-osx-7.4.21-0-installer.dmg") and double-click it to start the installation process.

A new Finder window will open with the XAMPP icon. Drag and drop the XAMPP icon into the "Applications" folder shortcut.


Step three: Grant permissions

After completing the copying process, locate the XAMPP application in the "Applications" folder.

Control-click (or right-click) on the XAMPP application icon and select "Open" from the context menu.

A security warning will appear, indicating that the application is from an unidentified developer. Click "Open" to proceed.

If prompted, enter your administrator username and password to authorise the installation.


Step four: Start Xampp and configure services

Launch XAMPP from the "Applications" folder.

The XAMPP control panel will appear. Click the "Start" button next to each service you want to use, such as Apache and MySQL. Wait for the services to start (the status indicators will turn green).

If macOS prompts you to allow incoming network connections for Apache or MySQL, click "Allow" to grant access.


Step five: Verify the installation

Open your web browser and type "http://localhost" in the address bar.

If XAMPP runs correctly, you should see the XAMPP welcome page or the XAMPP dashboard.

Congratulations! You have successfully installed XAMPP on your macOS operating system. Now that you have a local web server environment, you can start developing and testing websites.

Pro tip: Store your website files in the XAMPP installation directory's "htdocs" folder (usually found at "/Applications/XAMPP/xamppfiles/htdocs") so that you can access your projects by going to "http://localhost/your-project-folder" in your browser.

To save system resources while not using XAMPP, don't forget to stop the services from the XAMPP Control Panel. You can start the services again whenever you need them.


How to Install XAMPP on Linux

Step one: Download Linux

Open your web browser and visit the official XAMPP website (https://www.apachefriends.org/index.html ).

On the website, you will find the XAMPP download section. Look for the version of XAMPP compatible with Linux and click on the "Download" button.


Step two: Grant Executable Permissions

Open your terminal by pressing Ctrl+Alt+T.

Navigate to the directory where the XAMPP installer file was downloaded using the "cd" command. For example, if it is in the "Downloads" folder, you can use:

cd ~/Downloads

Run the following command to give the installer file executable permissions:

sudo chmod +x <xampp-installer-file-name>

Replace "<xampp-installer-file-name>" with the actual name of the XAMPP installer file.


Step three: Start the installation process

Run the XAMPP installer by executing the following command:

sudo ./<xampp-installer-file-name>

Replace "<xampp-installer-file-name>" with the actual name of the XAMPP installer file.

Enter your administrator password when prompted.


Step four: Select the installation component options

The XAMPP installation wizard will appear. Click "Next" to proceed.

Choose the components you want to install. By default, Apache, MySQL, PHP, and phpMyAdmin are selected. You can also include additional components if needed.

Click "Next" to continue.


Step five: Choose the installation folder

Choose the installation directory where you want to install XAMPP. The default location is "/opt/lampp". You can keep this or select a different folder.

Click "Next" to proceed.


Step six: Install XAMPP

Review the installation settings summary. If everything looks correct, click "Next" to begin the installation

Wait for the installation process to complete. This may take a few minutes.


Step seven: Run XAMPP services

After the installation, open the terminal again if it's closed.

Start XAMPP services by running the following command:

sudo /opt/lampp/lampp start


Enter your administrator password if prompted.

Select the Manage Servers tab, which can be found at the top of the window

Click Start All. Any running XAMPP components are prompted to start up by doing this.


Step eight: Verify the installation

Open your web browser and type "http://localhost" in the address bar.

If XAMPP runs correctly, you should see the XAMPP welcome page or the XAMPP dashboard.

Congratulations! Your Linux operating system's XAMPP has been successfully installed. Now that you have a local web server environment, you can start developing and testing websites.

Protip: Place your website files in the XAMPP installation directory's "htdocs" folder (often found at "/opt/lampp/htdocs") so that you can view your projects by going to "http://localhost/your-project-folder" in your browser.

Remember to stop XAMPP services when you're not using them to conserve system resources. Using the following command will accomplish this:

sudo /opt/lampp/lampp stop


Conclusion

XAMPP is a powerful tool that simplifies setting up a local web server environment on your computer. Whether you're a beginner or an experienced developer, this step-by-step guide has provided detailed instructions on installing XAMPP on different operating systems, including Windows, macOS, and Linux. By following these instructions, you can easily create a local development environment for web projects, allowing you to test and experiment with web applications without an internet connection. With XAMPP's bundled software components like Apache, MySQL, PHP, and phpMyAdmin, you have everything you need to start web development. So, confidently embark on your web development journey and unleash your creativity using XAMPP. Happy coding!

Related post

Recent Posts

Need help with a project?

Let's solve it together.