Signup/Sign In
PUBLISHED ON: FEBRUARY 27, 2023

XAMPP server setup in Windows

XAMPP is a powerful and easy to install web development environment that contains Apache, MariaDB, PHP and Perl. It is a perfect tool for building and testing web applications on your local computer. In this article, we'll walk you through the process of downloading and installing XAMPP on your Windows computers, along with some commands and expected results to help you troubleshoot any issues that may arise during the installation process.

Guide to install XAMPP

Step 1: Go to the XAMPP download page

  • Go to the official XAMPP download page at https://www.apachefriends.org/download.html
  • Select the version of XAMPP you want to install, the latest version is recommended.
  • Click the "Download" button.
  • Save the installation file to your computer.

Step 2: Download the installer

  • Locate the setup file and double-click it to start the installation process.
  • A security message will appear asking for permission to modify your computer. Click "Yes" to allow the installer to continue.

Step 3: Install XAMPP

  • Choose the language you prefer for the installation.
  • Select the components to install, by default they are all selected, you can choose to deselect the ones you don't want to install.
  • Select the folder where XAMPP will be installed, the default is "C:\xampp".
  • Click "Next" to start the installation process.

Step 4: Launch XAMPP

  • Once the installation is complete, launch XAMPP by clicking on the XAMPP Control Panel icon installed on your desktop.
  • This will open the control panel, where you can start and stop the Apache and MariaDB services.
  • You may need to disable your Windows Firewall and allow Apache and MySQL before you can successfully start the services.

Output and troubleshooting

The installation process may take a few minutes, depending on the speed of your computer. You can check the status of the Apache and MySQL services by running the following commands at a command prompt:

  • To start Apache: net start Apache2.4
    • Output: Apache2.4 service is starting.
      The Apache2.4 service started successfully.
  • To start MySQL: net start mysql
    • Output: MySQL service is starting.
      The MySQL service started successfully.
  • To stop Apache: net stop Apache2.4
    • Outout: The Apache2.4 service is shutting down.
      The Apache2.4 service stopped successfully.
  • To stop MySQL: net stop mysql
    • Exit: MySQL service is stopping.
      MySQL service stopped successfully.

If you experience problems during the installation process or are unable to start the Apache or MySQL services, please make sure that the ports used by XAMPP (80 and 3306) are not blocked by your network firewall.

In some cases, you may need to restart your computer for the changes to take effect.

Conclusion

XAMPP is an invaluable tool for web developers. By following the steps outlined in this guide, you should now have XAMPP installed and configured on your Windows computer. With this guide, you should have a smooth and easy installation experience and be able to start using XAMPP for your web development projects right away. If you run into any problems or have any questions, feel free to check the XAMPP official documentation or ask for help from the community.

Remember to stop XAMPP when you're not using it, to avoid security issues and even on Windows 10/11, you may need to disable the windows firewall and allow apache and mysql to pass through it before you can successfully start the services. With XAMPP, you have all the tools you need to develop and test dynamic web applications locally on your computer, which is an important step before deploying to a live server.



About the author:
Pradeep has expertise in Linux, Go, Nginx, Apache, CyberSecurity, AppSec and various other technical areas. He has contributed to numerous publications and websites, providing his readers with insightful and informative content.