I have a problem when using WAMP while designing and coding my site. Well, I have a local version of Wordpress installed in WAMP and use it as a tool to see my changes when coding. I also have the same files uploaded to some free hosting.

The problem is when I want to access for example http://localhost/contact. Browser gives me a 404 error. As I said, the same files (exact copy from my PC) are on the web here and when I go to http://thefalljourneyindia.iblogger.org/contact it opens the page fine (without the style of course because I haven't made one yet).

Why is that and how do I get to see all of my pages locally like I can when the WP installation is online?

  • Do any of the wordpress pages work on localhost? Commented Nov 18, 2011 at 14:28
  • Yes, just http://localhost. Neither single posts nor any other pages work in localhost. http://localhost/home doesn't work either...
    – user11320
    Commented Nov 18, 2011 at 14:37
  • Have you checked your log files? Commented Nov 18, 2011 at 14:55
  • [error] [client] File does not exist: C:/Program Files/wamp/www/contact And why does Su's idea then work? The one with ?p=386.
    – user11320
    Commented Nov 18, 2011 at 15:00
  • I just did a new installation of WP on localhost, made a new post and when I tried to see it here http://localhost/2011/11/18/test/, it gave me a 404. Yes, the new post was created after I changed the permalink structure.
    – user11320
    Commented Nov 18, 2011 at 15:25

1 Answer 1


You haven't said how you created the two site copies(db dump, export/import, etc), so...

Have you actually configured the local one to also use pretty URLs? (Settings->Permalinks) That wouldn't go along as part of a file copy; it's in the database. Or you might've just forgotten it.
If not, then your install is still expecting links in the default http://example.com/?p=### format
If the local is a dupe of the published site, then try http://localhost/?p=386 (that's the id of the contact page).

I haven't used WAMP for a bit so can't recall the case then, but apparently as recently as this February mod_rewrite wasn't enabled by default, which you'll need for the pretty URL rules to work. So that's one more thing to check.

Solution from the site mentioned above:

Wamp and XAMPP doesn’t come with default rewrite rule enabled, For enabling the rewrite rules in both of them you need to make changes in httpd.conf so that apache can work with rewrite rules.

For enabling the rewrite rules follow these rules:

  1. Find httpd.conf (\wamp\bin\apache\Apache2.2.11\conf something along those lines

  2. Uncomment the line LoadModule rewrite_module modules/mod_rewrite.so

  3. Find the line with DocumentRoot “C:/path/to/my/root”, There you will find contents like Make sure the content inside these two braces looks like Options All AllowOverride All

  4. Restart the Apache server and you should be good to go.

  • Online version is actually the copy. Your idea with ID does work in localhost but I don't know why I can't use the same path as the one I mentioned? The permalink settings are the same in both installations /posts/%postname%/
    – user11320
    Commented Nov 18, 2011 at 14:55
  • See above for edit.
    – Su'
    Commented Nov 18, 2011 at 15:30
  • You are right! I don't have a clue how you got to that conclusion, but that was the answer! Thank you for your help. It was a weird problem, I must say...
    – user11320
    Commented Nov 18, 2011 at 15:40
  • See best ans: steptoinstall.com/…
    – KarSho
    Commented Feb 20, 2014 at 11:38
  • Thanks for the comprehensive answer! Could only find bits and pieces elsewhere but you put a few solutions together in the same place. Sorry more people haven't upvoted it.
    – Fernando
    Commented May 11, 2015 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.