Local Web Server on Windows

How to Install XAMPP on Windows 

XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages.

Download XAMP and install in your local PC.

Default installation directory: C:\xampp

Keep your php files : C:\xampp\htdocs

once you done the installation, open google chrome type http://localhost

Local Web Server on Windows
XAMPP Server : Dashboard

How to configure XAMPP on Windows ?

The XAMPP Control Panel includes three main sections. In the Modules section, you’ll find all the web services available. You can start each service by clicking the Start button.

When you start some of the services, including Apache and MySQL, on the right side, you’ll also see the process ID (PID) number and TCP/IP port (Port) numbers each service is using. For example, by default Apache uses TCP/IP port 80 and 443, while MySQL uses TCP/IP port 3306.

You can also click the Admin button to get access to the administration dashboard for each service and verify that everything is working correctly.

Local Web Server on Windows
XAMP Server - Control Panel

The default settings should work for most people using XAMPP to create a testing environment to run a website. However, depending on your setup configuration, you may need to change the TCP/IP port number for the Apache server, the database upload size, or set the password for phpMyAdmin.

To change these settings, you’ll need to use the Config button for the corresponding service. For example, you’ll need to open the httpd.conf file to change the settings on the Apache server, and the my.ini file to change the MySQL settings.

How to fix Apache not starting on XAMPP

The XAMPP installation is very straightforward, but Windows 10 sometimes may not allow the Apache server to run. Usually, it’s because the World Wide Publishing Service is running on port 80 on your computer, which also happens to be the default TCP/IP port that Apaches uses on XAMPP, and two applications can’t use the same port.

If you run into this issue, there are a couple of ways to get around it. You can uninstall the publishing service, or you can change the default port on Apache.

Uninstall World Wide Web Services

If you don’t have any app depending on the World Wide Web Services feature, you can uninstall it using these steps:

1. Open Start.

2. Search for Control Panel, and click the top result to open the experience.

3. Click on Programs.

4. Click the Programs and Features option.

5. Click the Turn Windows features on or off link. 

6. Expand Internet Information Services and clear the World Wide Web Services option.

7. Click the OK button. 

8. Restart your computer.

9. Start the XAMPP Control Panel.

10. Click the Start button on Apache.
After you complete the steps, Apache should be able to run in port 80 on your device.

Change the default Apache TCP/IP port

Alternatively, you can configure Apache to run on a different TCP/IP port using these steps:

1. Open XAMPP Control Panel.

2. Click the Admin button on Apache.

3. Click the httpd.conf option.

4. Scroll down and find the line: Listen 80.

5. Change the 80 for another TCP/IP port number. For example, you can try port 81. (After the change the line should read: Listen 81.)

6. Save and close the httpd.conf file.

7. Click the Start button on Apache.

Once you complete the steps, the Apache server should run without issues on the new TCP/IP port you specified.

The only caveat with this configuration is that you’ll need to append TCP/IP port number on the address every time you want to connect to your website. For example, to access the Apache server on the web browser, you will need to type: “localhost:81/dashboard” instead of “localhost/dashboard.”

Manually stop World Wide Web Publishing Service

Another way to fix the port problems issues is to stop the service and change its settings to only start the service manually using these steps:

1. Open Start.

2. Search for Services, and click the top result to open the experience.

3. Double-click the World Wide Web Publishing Service service.

4. Click the Stop button.

5. Change the startup type to Manual.

6. Click the Apply button.

7. Click the OK button.

8. Open the XAMPP Control Panel.

9. Click the Start button to run the Apache server.
The best way to get Apache working again is by uninstalling the World Wide Web Publishing Service, but when that’s not possible you can alternatively change the TCP/IP port number or stop service as necessary.

How to increase phpMyAdmin upload size on XAMPP

Another common problem with XAMPP is the default database upload limit. For example, many times developers will make a copy of a website for troubleshooting purposes or work in site without disrupting the live website. However, people using WordPress or another content management software will quickly find out that they can’t upload a database because it exceeds the maximum upload size permitted, which by default is 2,048KiB.

Use these steps to increase the database upload limit on phpMyAdmin using these steps:

1. Open XAMPP Control Panel.

2. Click the Explorer button.

3. Open the php folder.

4. Open the php.ini file with any text editor.

5. Change the value for upload_max_filesize and post_max_size to the size you want. For example: post_max_size=20M and upload_max_filesize=20M to import database files of up to 20MB.

6. Click the Stop button for MySQL and Apache .

7. Click the Start button to restart Apache and MySQL.

Once you complete the steps, you should now be able to import large database files on phpMyAdmin.

How to change phpMyAdmin password on XAMPP

By default, phpMyAdmin (MySQL) uses “root” as username without password, which means that if you’re installing a WordPress site, when asked you only need to enter root as the username and leave the password field empty.
Use these steps to change the phpMyAdmin password on XAMPP:

1. Open XAMPP Control Panel.

2. Click the Admin button for MySQL.

3. Click on the User accounts tab.

4. Click the Edit privileges link for the username root, but the one with hostname localhost.

5. Click the Change password button.

6. Specify the new password.

7. Click the Go button.

Thank you.