14 Sep 2017

How to fix WAMP’s missing localhost in URLs

Applies to: WAMPSERVER 3.0.6 64-bit
You’ve probably run into this problem a bunch, where you have a few projects located in the www folder, and when you go to http://localhost/ or http://127.0.0.1/ and click on your project name it just points to http://mysite/ instead of http://localhost/mysite/. Super annoying to be manually typing it in every time. But with the latest version of WAMP Server (3.0.6 at the time of writing this, there’s a setting you can turn on to easily change this:

It is now configurable from the Wamp Aestan Tray menu.

  1. Right-click on wamp icon in your system tray on the right.
  2. Go to “wamp settings”
  3. Enable “Add localhost in URL”
  4. If you see the green tick mark, it is enabled.

Now refresh your localhost home page and check URLs. It should be working perfectly.

In older versions of WAMP:

Open wamp/www/index.php

Change this line:

$suppress_localhost = true;

To :

$suppress_localhost = false;

Leave a Comment