This is the method on how to change the default XAMPP localhost:80 port number, follow these simple steps:

  1. Open the XAMPP control panel
  2. Stop all running services
  3. Click on the Config button
  4. In the Configuration panel, click on the 'Service and Port Settings' button
  5. In the Service Settings panel under Apache, change the "Main Port' number to whatever you like. In our example in the image above, we selected port 8007 and port 8443 for SSL
  6. Click on Save
  7. Click on Save
  8. Ensure you are NOT running Apacher. In the main XAMPP control panel, under the actions section, select Apache>Config>Apache(httpd.conf)
  9. In the httpd.conf file, search for "Listen 80" and change it to "Listen 8007" and save the changes and close the file.
  10. In the XAMPP main control panel, under the actions section, select Apache>Config>Apache(httpd-ssl.conf)
  11. In the httpd-ssl.conf file, search for "Listen 443" and change it to "Listen 8443" and save the changes and close the file.
  12. In the XAMPP control panel, start the Apache module.
  13. Start your Apache server
  14. Open URL in your browser: http://localhost:8443/dashboard/ or http://localhost:8007/dashboard/

XAMPP is a very useful package for developing PHP applications in your local machine like your laptop for example. During our development, we needed to upgrade a customer's script from PHP 5 to PHP 7, we needed to test simultaneously, with XAMPP, you can run two services with different ports.

That is all, enjoy