How to Install and Configure Xampp on Windows
XAMPP is the most popular software package which is used to set up a PHP development environment for web services by providing all the required software components. During the process of software deployment, most of the web servers use almost similar components, so the use of XAMPP provides an easy transition from local server to live server. XAMPP is an AMP stack that stands for Cross-platform, Apache, MySQL, PHP, Perl with some additional administrative software tools such as PHPMyAdmin (for database access), FileZilla FTP server, Mercury mail server, and JSP Tomcat server.
Other commonly known software packages like XAMPP are WAMP, LAMP, and others.
The XAMPP server is used to test PHP pages. It works as a local server. It contains a MySQL database to manage or save data on a local server.
Advantages of XAMPP:
- It is free and easy to use and easily available for Windows, Linux and Mac OS .
- It is a beginners friendly solution package for full stack web development.
- It is a open source software package which gives a easy installation experience.
- It is very simple and lightweight to create set up for development, testing and deployment.
- It is a time-saver and provides several ways for managing configuration changes.
- It handles many administrative tasks like checking the status and security.
Software components of XAMPP:
- Apache plays the role of processing the HTTP request. It is the actual default web server application. It is the most popular web servers maintained by Apache Software Foundation.
- MySQL The role of database management system in XAMPP is played by MySQL. It helps to store and manage collected data very efficiently. It is an open-source and most popular.
- PHP is the server-side scripting language which stand for Hypertext Preprocessor. It is embedded with HTML code which interacts with the webserver. It is an open-source and work well with MySQL and has become a common choice for web developers.
- Perl is the high-level programming language designed for text editing which serves purpose like web development and network programming.
Installing XAMPP
Step 1: Download
XAMPP is a release made available by the non-profit project Apache Friends. Versions with PHP are available for download on the Apache Friends website.
Step 2: Run .exe file
Once the software bundle has been downloaded, you can start the installation by double clicking on the file with the ending .exe
Step 3: Deactivate any antivirus software
Since an active antivirus program can negatively affect the installation process, it’s recommended to temporarily pause any antivirus software until all XAMPP components have successfully been installed.
Step 4: Start the setup wizard
After you’ve opened the .exe file (after deactivating your antivirus program(s), the start screen of the XAMPP setup wizard should appear automatically. Click on ‘Next’ to configure the installation settings.
Step 5: Choose software components
Under ‘Select Components’, you have the option to exclude individual components of the XAMPP software bundle from the installation. But for a full local test server, we recommend you install using the standard setup and all available components. After making your choice, click ‘Next’.
Step 6: Choose the installation directory
In this next step, you have the chance to choose where you’d like the XAMPP software packet to be installed. If you opt for the standard setup, then a folder with the name XAMPP will be created under C:\ for you. After you’ve chosen a location, click ‘Next’.
Step 7: Start the installation process
Once all the aforementioned preferences have been decided, click to start the installation. The setup wizard will unpack and install the selected components and save them to the designated directory. This process can take several minutes in total. You can follow the progress of this installation by keeping an eye on the green loading bar in the middle of the screen.
Once all the components are unpacked and installed, you can close the setup wizard by clicking on ‘Finish’. Click to tick the corresponding check box and open the XAMPP Control Panel once the installation process is finished.
The XAMPP Control Panel
Controls for the individual components of your test server can be reached through the XAMPP Control Panel. The clear user interface logs all actions and allows you to start or stop individual modules with a single. The XAMPP Control Panel also offers you various other buttons, including:
- Config: allows you to configure the XAMPP as well as the individual components
- Netstat: shows all running processes on the local computer
- Shell: opens a UNIX shell
- Explorer: opens the XAMPP folder in Windows Explorer
- Services: shows all services currently running in the background
- Help: offers links to user forums
- Quit: closes the XAMPP Control Panel
Starting modules
Individual modules can be started or stopped on the XAMPP Control Panel through the corresponding buttons under ‘Actions’. You can see which modules have been started because their names are highlighted green under the ‘Module’ title.
Setting up XAMPP
A common source of error connected with Apache is blocked ports. If you’re using the standard setup, then XAMPP will assign the web server to main port 80 and the SSL port 443. The latter of these particularly is often blocked by other programs. We must proceed to change to another port as follows:
Step 1. Click on Config -> Select Service and Port Setting
Step 2. Đổi Main Port -> 8080
Step3. Đổi SSL Port -> 465
After changing in Service and Setting. You must also change in the following 2 files.
Edit Main Port in httpd.conf file
Press Ctrl + F to find port 80. Replace Listen 80 with Listen 8080 then save the file
Edit SSL Port in httpd-ssl.conf file
Press Ctrl + F to find 443. Replace Listen 443 with Listen 465. then save the file.
Now you can start Apache on and see the port has changed.
Once done you can check again by reaching the dashboard through http://localhost:8080/dashboard/.
Module administration
You have an ‘Admin’ option located on the Control Panel for every module in your XAMPP.
The dashboard features numerous links to websites for useful information as well as the open source project BitNami, which offers you many different applications for your XAMPP, like WordPress or other content management systems. Alternatively, you can reach the dashboard through http://localhost/dashboard/.
You can use the Admin button of your database module to open phpMyAdmin. Here, you can manage the databases of your web projects that you’re testing on your XAMPP. Alternatively, you can reach the administration section of your MySQL database via http://localhost/phpmyadmin/.
Testing your XAMPP installation
To check whether your test server is installed and configured correctly, you have the option to create a PHP test page, store them on your XAMPP’s local host, and retrieve them via the web browser.
- Open the XAMPP directory through the ‘Explorer’ button in the Control Panel and choose the folder htdocs (C:\xampp\htdocs for standard installations). This directory will store file data collected for web pages that you test on your XAMPP server. The htdocs folder should already contain data to help configuration of the web server. But you should store your own projects in a new folder (like ‘Test Folder’ for example).
Here is an example of a simple website of ours.
- Or you can create a new PHP page easily by using the following content in your editor and storing it as demo.php in your ‘ test’ folder (C:\xampp\htdocs\test):
<html> <head> <title>PHP-Test</title> </head> <body> <?php echo '<p>Welcome To GreenCloudVPS</p>'; ?> </body> </html>
- The last step now is to open your web browser and load your PHP page via localhost/test/demo.php. If your browser window displays the words ‘Welcome To GreenCloudVPS’, then you’ve successfully installed and configured your XAMPP.
Also, if you need to open ports on the firewall you can see our guide HERE.
Conclusion
In this article, we have how to Install and Configure Xampp on Windows, this article will be useful for you. Good luck!