If you want to run your website on a local server, XAMPP(Cross-platform, Apache, MariaDB (MySQL), PHP and Perl will be your solution. You might be asking yourself, “Why do I need to run my website on a local server?”. We have already covered an article for installing WordPress in Localhost where you will get the answer to this question.
Running a website on a local server is a great way to measure the changes without affecting the original website. You probably don’t want to show anything to your audience that is unprepared. It is a great way to run some tests on your website or preview it after some customization.
If you have understood the importance of running your website on a local server, then you must install XAMPP on your system and configure it. We have discussed the process of installing XAMPP on various operating systems like Windows, Linux, MAC OS X in our how to Install WordPress in Localhost article.
While running XAMPP, it is possible to face some errors that will not allow it to work properly sometimes. This article is about indicating the common errors while running XAMPP and how to solve these errors.
Unexpected Shutdown of XAMPP Apache (port 80 and 443 in use):
The very common problem that you may face while running XAMPP is the default port 80 and 443 issues. The default 80 and 443 port might be already in use by other programs like Teamviewer, Skype, etc. This issue can be solved in 2 different ways. However, we are going to show you the most common and effective solutions that work every time.
Solution 1: Stopping the Conflicting programs that prevent XAMPP from being launched
If you are using Skype on your PC, it can conflict with XAMPP. In this case, Teamviewer can also work as an offending application. Even if you have an online game installed on your computer, you may encounter this kind of problem. You may see an error message like the image below –
First, we will talk about the easy and straightforward solution; which is stopping the conflicting apps. However, things may not always go the way they should be. At different times minor changes need to be applied for the same solution. We will talk about all the solutions that can be done in the easiest way possible –
- If you face such an issue, the very first thing you need to do is to stop Skype, Teamviewer, or similar types of conflicting applications immediately and restart XAMPP.
- If it won’t work, then you can stop the World Wide Web Publishing Service utility application; which remains pre-installed on many Windows computers most of the time. In order to stop it, look for the application in
Now, look for the application and select it. Then click on (Stop).
- Sometimes Windows Firewall can force to block the ports. You may need to apply a new inbound rule for keeping the default 80 and 443 ports remain unblocked. Do this by navigating to
Solution 2: Reconfigure XAMPP Apache
When the 80 and 443 port remains engaged for some reason, you will need to reconfigure them to launch XAMPP. Sometimes, reconfiguring the default 80 and 443 ports can be a bit challenging. We will show you the effective method to solve this issue.
The question is, do you really need to configure both ports? Or reconfiguring only one port will do the job? Well, it depends on the situation actually. You may need to change either both or only one port to solve this issue.
Reconfiguring Port 80 :
First, open the XAMPP Apache application and click on the (Config) button that is in the same row as Apache. Selecting the Apache (httpd.conf) will open a notepad. Alternatively, you can go to C:\xampp\apache\conf\httpd.conf to open the file manually. Once you have opened the file, search for the line saying ServerName localhost:80 that can be usually found at line 176. Replace it with ServerName localhost:81 or ServerName localhost:8080 (You can change it to your preferred port).
Then, locate the line that says Listen 80, which can be found at line 45, and change it to either Listen 8080 or Listen 81. Now, you need to save the file and close it.
Now that you have replaced the port, restart XAMPP and you see that Apache is running on ports (443 and 81) or (41 and 8080) instead of port 80. Not only can these two types of ports be offered, but you can also use any suitable port. We just explained the process.
However, you may need to do a little bit more work to preview the changes –
- Rather than using http://localhost/, you have to use either http://localhost:8080/ or http://localhost:80/ (depending on the port that you have used) to access your XAMPP-powered website.
- If you have already installed a WordPress site locally before changing the port, you may need to open the ‘wp-config.php’ file and manually update WP_HOME and WP_SITEURL. Otherwise, the new domain prefix won’t be reflected.
Reconfiguring Port 443:
This method is kind of similar to the process of reconfiguring port 80. Click the same (Config) button and select Apache (httpd-ssl.conf) this time. As usual, it will open a notepad. Similarly, you can also open the file by navigating to C:\xampp\apache\conf\httpd-ssl.conf.
Once you have opened the file, press (Ctrl+F) to search for the Listen 443 line. Now, change the line to Listen 10443 or Listen 4433 (Choose the one that you preferred).
Once you have done it, search for the line “”. Change the port number to either 10443 or 4433 according to the port that you have given for Listen 443. Now save the file and close it.
Note that – If you have replaced 443 with 10443, then you have to select 10443. Otherwise, it won’t be of any use at all. This is also applicable for reconfiguring port 80.
Now, that you have configured the Apache (httpd-ssl.conf) file, it’s time to apply some changes to the XAMPP control panel –
1. Click the ‘Config’ button at the top left corner as we have shown in the picture below –
2. As soon as you click the ‘Config’ button, a new portal will appear. Then, click on the ‘Service and port changes’ button.
3. In the ‘Apache’ tab, change the main port and SSL port to the new ports.
4. Now, double click on the ‘Save’ button and exit the portal.
5. All you need to do is restart the XAMPP now. That’s it! you will notice the Apache is running on ports 10443, 4433, or the preferred port that you have given.
The Difference Between port 80 and port 443:
The difference between port 443 and 80 is – port 80 is typically the World Wide Web. Whereas, the 443 is more like the HTTPS protocol (TLS/SSL). Therefore, the 443 TCP port will be used by the HTTPS connections and port 80 will be used by the insecure HTTP connections. Both of these ports are associated with “the internet” and if a web server is hosted, connections to that web server will be allowed internally.
FAQ:
1. Why is XAMPP not working in my browser?
Ans: The main reason behind this problem is that the default 80 port is already occupied by some other services. As a result, XAMPP won’t start as it is unable to find the port that it usually works on. This problem can occur most likely when you are using Skype on your system.
2. Why MySQL is not working in XAMPP?
Ans: One of many issues is that XAMPP can’t run MySQL by itself. In order to solve this, you can follow these simple steps –
- First, make sure that ‘mysqld.exe’ is not running. You can end the program by going to
Task Manager → Progresses Tab → Right click on ‘mysqld.exe’ → Click on “End Task”
- Either open services.msc by accessing the Run program by clicking the “Window + R” button or open it from the XAMPP ControlPanel by clicking the ‘Services’ button.
- Now, find the service called ‘MySQL’. Right click on the service and run it. If you have done everything accordingly, you may need to restart XAMPP.
3. How to find out if XAMPP is working correctly or not?
Ans: The answer is very simple. After successfully installing XAMPP in your system, start the Apache module by opening the XAMPP control panel. Then type the URL localhost/Test/test.php on a suitable browser. If your browser says – “XAMPP Server runs successfully”, then hurray! XAMPP is perfectly working in your system.
Final Verdict:
Now that you have read the whole article, we are guessing you found your solution to the “XAMPP Apache is not Working” issue. If you still have confusion or stuck in the middle of the process, feel free to ask any questions regarding this topic in our comment section. We hope you have enjoyed reading this article. Stay tuned with us for more awesome content like this one.
Leave A Comment
You must be logged in to post a comment.