
How to Install XAMPP on Windows
What is XAMPP?
XAMPP is one of the most alluring options for developers seeking a seamless setup for web development on Windows. It brings together Apache, MariaDB (or MySQL), PHP, and Perl, sparing you the headache of installing and configuring each component individually. Whether you’re a seasoned pro or just starting out, XAMPP simplifies the process of establishing a local server environment. Its intuitive interface and integrated tools make it the natural choice for anyone diving into web development.
Benefits of using XAMPP
It’s a free, user-friendly, and readily available solution that works seamlessly across Windows, Linux, and Mac OS platforms. Tailored with beginners in mind, it simplifies the complexities of full-stack web development. Being open-source, its installation process is a breeze. Lightweight and straightforward, it swiftly sets up your environment for development, testing, and deployment purposes. Not only is it a time-saver, but it also offers multiple avenues for managing configuration changes efficiently. Furthermore, it adeptly handles various administrative tasks, including status checks and security measures.
Installing XAMPP on Windows
Now that we know how good it is, let’s download and install XAMPP.
NOTE: if you want to use Tomcat, you should have JAVA JDK/JRE installed on your computer.
Download XAMPP: Visit the official XAMPP website (https://www.apachefriends.org/index.html) and download XAMPP for Windows.

Run the Installer: Once the download is complete, locate the downloaded file and double-click to run the installer. You may be prompted by the User Account Control (UAC) to allow the installer to make changes to your system. Click “Yes” to proceed.

Choose Components: In the installer window, you’ll be presented with a list of components to install. By default, Apache, MySQL, PHP, and phpMyAdmin are selected. You can customize the installation by selecting or deselecting components as needed. Click “Next” to continue.

Select Installation Directory: Choose the directory where you want to install XAMPP. The default directory is usually “C:\xampp,” but you can choose a different location if desired. Click “Next” to proceed.

Select your language: From the dropdown, select the language of your preference.

Start Installation: Click on the “Next” button to begin the installation process. The installer will now copy files to the selected directory and set up XAMPP on your system. This may take a few minutes to complete.

Complete the Installation: Once the installation is finished, you will have the option to launch the XAMPP Control Panel with a checkbox. Check the box to launch it and click “Finish.”

Start Services: In the XAMPP Control Panel, you’ll see a list of services such as Apache and MySQL. To start these services, simply click on the “Start” button next to each service.

Verify Installation: Open a web browser and navigate to http://localhost/. If XAMPP has been installed successfully, you should see the XAMPP dashboard, indicating that Apache and other services are running correctly.

If you see this page load, it means you have successfully installed XAMPP.
Error in starting XAMPP
XAMPP uses port 80 to operate. If at any point of starting the services, you face an error and you are unable to start XAMPP, it could mean that some other service is using port 80. You can try stopping the service and then try restarting XAMPP. It could fix.
Creating a test page with XAMPP
To create a test PHP website with XAMPP, begin by navigating to the XAMPP installation directory, usually located in “C:\xampp\htdocs”. Within this directory, create a new folder for your website, naming it as desired (e.g., “testsite”).

Inside this newly created folder, proceed to create a new file named “index.php” using a text editor like Notepad or Visual Studio Code. In this “index.php” file, write some basic PHP code to display a message. For instance, you can write “<?php echo ‘Welcome to my PHP website!’; ?>”.

Once you’ve written the PHP code, save the file. You can then access your website by typing “http://localhost/mywebsite” into your web browser’s address bar. Make sure to replace “mywebsite” with the actual name of the folder you created earlier. Upon pressing Enter, you should see the message “Welcome to my PHP website!” displayed in the browser window. This confirms that your PHP website is successfully running on your local server.

For further testing and development, you can create additional PHP files within the same folder or incorporate HTML, CSS, and JavaScript code as needed. Additionally, you can explore interactions with a MySQL database to enhance the functionality of your website.
By following this process, you can efficiently develop and test your website locally using XAMPP before deploying it to a live server environment.
Uninstalling XAMPP from your computer
Before uninstalling XAMPP from your computer, make sure that all the services that you’ve started in the beginning have been stopped.

Now close the application, and head on to the control panel. Under “Programs” and click on “Uninstall a program”.

On the next window that opens up, you’ll have a list of all the programs installed on your computer. Scroll down to find XAMPP and then click on the “Uninstall/Change” button (as highlighted).

You will be prompted to confirm if you want to remove XAMPP and all of its modules. Select Yes.

After that, you’ll be asked to confirm if you want to delete your “htdocs” folder too. You can select yes or no based on your preference. After the selection, the uninstaller will start removing it along with all of its components.

Once this completes, XAMPP will be completely removed from your computer.