Sometimes, you type or requested localhost/phpmyadmin url on a browser with Xampp server, and get an error that localhost/phpmyadmin is not working properly or opening it with Xampp server on Windows, Which means the port is conflicting with your Xampp server, To fix this error, you have to open the httpd.conf, and change current ports value and save it.
If you use xampp Server on Windows machine, then sometimes this error is common. To fix this error, you just have to open the Apache httpd.conf file of xampp Server and change the ports, this error will be fixed.
How to fix localhost/phpmyadmin not opened with xampp Windows
Here are some steps to fix the error localhost/phpmyadmin is not working with xampp windows:
Step 1 – Edit httpd.conf
Open the httpd.conf
file in the Apache configuration on any text editor, which is located C:\xampp\apache\conf\httpd.conf
.
Step 2 – Change Ports
Now in httpd.conf
file to search Listen
, Look for the following line and change Listen 80
to Listen 8012
:
Listen 80
To
Listen 8012
Save and close this file to apply the changes.
Next in httpd-sss.conf
file to search Listen
, Look for the following line and change Listen 443
to Listen 8013
:
Listen 443
To
Listen 8013
Save and close this file to apply the changes.
Step 3 – Configure XAMPP Apache server settings
Visit config and select “service & ports settings” using xampp control panel and change the ports to 8012 and 8013 and save it.
You can use the following steps for that:
- Open Xampp Control Panel
- Go to Config ► Service and Port Settings ► Apache
- Change the Main Port and SSL Port values with those chosen (e.g.
8012
and8013
). - Save Service settings and Close prompt
- Save Configuration of Control Panel and close prompt.
Step 4 – Restart Xampp Services
Now it’s time to restart apache and mysql in xampp server, so go to XAMPP control panel, then restart them again.
Step 5 – Test PHPMyadmin
Now open your browser and type the below url with your server ip address or localhost to verify:
http://[SERVER_PUBLIC_IP]/phpmyadmin
Make sure you are using the correct URL, it has been fixed and You can access your phpmyadmin
on localhost windows:
Conclusion
That’s it, you should be able to resolve the “localhost and phpmyadmin is not working” error in xampp server on your Windows machine.