Support » Fixing WordPress » WordPress using local IP address in absolute URLs

  • Hi everyone. My first post – hope it all goes well..

    My background is as a designer, not a programmer – so I’m not particuarly strong with php or mysql – though I can get by with the basics. I’m learning, anyway.

    I’ve recently installed a small web-server on my lan (running ClarkConnect/linux in standalone mode), just to get to know linux/apache a bit better.

    The problem I’m having is that though wordpress (2.0.1) works fantasically on the lan, it does not work so great externally. It knows that it’s address on the LAN is, but when other people view it, (the source), the links still point to – So, for example, all the php/html in the page loads correctly, but the stylesheet (or any images), which are all linked, do not.
    For example, the link to the stylesheet that I see in the source code from the browser is :

    Now, if I brose the wp directory, and open the relevant .php file, I can find the same link before it is rendered in PHP – it looks like this :

    <?php bloginfo('stylesheet_url'); ?>

    I would normally assume that this is the fault of php (or apache), which somehow thinks that the machine’s address is still HOWEVER, two things make me think otherwise – the call to the above function (bloginfo), and, because I see that in my wordpress general options page the following is entered (automatically, I think – I don’t remember) :

    WordPress address (URI) :

    Obviously, this is a silly problem and shouldn’t be happening, at all!

    I cannot find the function bloginfo anywhere. I understand that I can replace the “WordPress address (URI)” with my external IP (thankfully, static) but then I won’t be able to access it locally, correct?

    I’m extremely hopeful that this can be sorted out, cause wordpress seems like an amazing piece of software. That’s why I know something like this will be easily solved. I can’t find any reference to this problem anywhere, either.

    Thanks all very much for reading this, and for your time.
    Please let me know if I can supply any other information.

    – Jeremy

Viewing 4 replies - 1 through 4 (of 4 total)
  • I can replace the “WordPress address (URI)” with my external IP (thankfully, static) but then I won’t be able to access it locally, correct?

    That’s aboslutely correct. There is no other way around. You either have a local install or a web install. You cannot have both.
    The URIs are stored in the database, like the other settings.

    AdamWC has my problem, too.

    So there really is no way around this? I’m fully prepared to hack up the php, if it means I can enable the scenario I want.

    Would it be possible to do some kind of forwarding with my router? It seems to have the full suite of forwarding NAPT functions etc.


    – Jeremy

    Moshu, I think you are far too quick to condemn both me, and a very large number of other wp users, to a fate most awful. I was in the process of switching to another blog, one which would do that which I wanted, and tried my luck posting on some forums – granted, they do not know as much about wordpress as you clearly do, but through clear communication and persistence they were able to find a workaround for me.

    There is a way around. When I have checked it works, I’ll document it – is there somewhere specifially for this?

    – Jubilantjeremy

    I never claimed I know everything – not even about WP. And based on the experience of almost 2 years spent in the forum I’ve never seen a solution for this.

    If you found a workaround – that’s great!
    Probably the best way would be to make it available in the Codex. Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress using local IP address in absolute URLs’ is closed to new replies.