Support » Installing WordPress » Behind Router/LAN

  • Hi! I’ve searched for this topic and found some similar threads, but none with an answer to my prob 🙁

    I’ve got 2 computers in a LAN, behind a D-Link router. One of those is hosting WordPress: WinXP Pro SP2 with Apache2, PHP 5.1.2 and MySQL 4.1.

    Basically after installing I can either let the world see my blog, or me (from my LAN). I’ve tried to forward ports and everything, with no success. If I set WP to I can’t see it or admin it; but if I set it to http://localhost/, no one else can visit it.

    Is there a .php file I can modify or a setting I can change? I was really amazed with WP, compared to other blogs, but this LAN thing is really bugging me :/


Viewing 15 replies - 1 through 15 (of 15 total)
  • Zyzzy,

    You have the forward port 80 of the machine where your WordPress blog is running. For example: if the ip address of the system is, you need to setup your router to forward on port 80 so that the rest of the world can see it.

    In addition, you also need to make an entry with your Windows “hosts” file so that you can type in in your browser. Typing localhost should work also.

    Hosts entry

    Hope that works out for you.



    The port forwarding is already done – although I use 1024 because my ISP blocks port 80. This “host” thing sounds like what I need, but I don’t know how do that 🙂 I’m using FF 1.0.7, if it helps in anything.

    Thank you,

    PS: Is it the one in C:\Windows\system32\drivers\etc? If so, after I add the entry, do I reboot?


    Your host file can be found in WINDOWS\system32\drivers\etc.
    It’s a plaintext file, edit with notepad or similar.

    Ulysses, Class,

    I’ve tried editing the host file (actually I found 2, “hosts” & “hosts.msn” – I edited both), but when I type in FF, I still get the error. The entry must have the “http://” part, right? Does this file startus up automatically? *head scratch*


    It’s the hosts that is correct and no, just use the domain, like

    The entry in your hosts file should look like this:

    Most definitely without the http:// bit.

    A reboot will make sure your PC picks it up (though it shouldn’t really be necessary).

    Ahhh I see.. one last thing: does the hosts file admit ports? Example:

    No effect 🙁 could it be cause of the :1024 maybe?

    hmm. try typing this in your browser:

    I’d like to add that I’m having a problem that seems similar to the one Zyzzy is having. I have my, admittadly, simplistic site set up at

    I have no problem viewing the site from within my local network, which I take to mean that the site should work, with proper routing, from the outside as well.

    However, when I attempt to view the site from anywhere outside my network, or though a proxy, it never finishes loading. Interestingly, the default Os X Server homepage I have running at and its accompanying blog work fine from within and without my local network.

    I have port forwarding from port 2175 to port 80 on my web server, and dns pointing to, so I can’t understand why my blog won’t load. Any ideas? Thanks

    BenHMin, I suspect it has to do with the fact that when [I] try to reach it, I’m directed to, which is a local IP on your LAN, not one that’s accessable to the Internet at large.

    How would one go about changing to which IP wordpress points to? In the wp-config.php file i can edit the database host, but should I?

    Ulysses, the DNS service I use already makes the port changes, so there’s no need to use the :1024 at the end of the URL. Maybe Windows doesn’t like that in the hosts file?

    Nevermind, I know what it is. Hosts file doesn’t use ports at the end, so it wasn’t working. I made all the changes to use port 80 and it works. Problem is that my ISP blocks port 80 – but that’s not you guys’ problem 😉

    Thanks very much for the help! 😀

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Behind Router/LAN’ is closed to new replies.