WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] No CSS on local computer

[Resolved] No CSS on local computer

  • RandomZero
    Member

    @randomzero

    So last night I installed wordpress on my local server (XAMPP on WinServer2003 connected through ICS) but didn’t have time to configure it because I had to go to work.

    At work, I had some time on my hands so I decided to log in (which is funny because word pretty much blocks out the entire internet, so I have to set my server up to use port 8080) and continue setting up wordpress.
    It worked flawlessly at work. I got it set up in just a few minutes, I posted a new msg and created a new account.

    So then I come home and try to access it. Only, it wouldn’t load?
    The main page works, but the wordpress directory does not, the wp-admin directory does not, nor does any php file.
    So I open up the readme.html file, and it opens fine.
    There’s a link to log in, so I try that. It works, but there’s no css and it takes the page a while to load.

    Anyone know how to fix this?

Viewing 15 replies - 1 through 15 (of 25 total)
  • Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    Got it configured to be “localhost”? You can’t do that and then expect to be able to access it from another machine.

    RandomZero
    Member

    @randomzero

    Yes.

    It works at work, on a completely different network, using the URL.

    But it doesn’t work on my home network, either on my main pc or on the pc hosting the server using either localhost, 127.0.0.1, or the PC’s network IP.

    Every machine in th world “thinks” of localhost – as itself.

    Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    RandomZero: What I mean is, what do you have the WordPress installation’s URL set to be? See, WordPress knows it’s own URL. It needs to do that in order to build the site.

    So if you have the URL set to localhost, then it will build the site, and it’s own links in that site, accordingly. And thus, when another machine tries to load it, and sees the localhost URL, it won’t look at the site for the CSS files and other stuff, it will only look at itself.

    The URL of a WordPress site cannot be localhost unless you only want it to work on that machine.

    RandomZero
    Member

    @randomzero

    Yeah, I used localhost and 127.0.0.1 on the machine hosting the server.

    But I used the machines network IP on my main pc, which is not hosting the server.

    But, I just deleleted the database and recreated it and it works now.
    Thanks for the help.

    RandomZero
    Member

    @randomzero

    Oh, ok.

    How would I go about changing that?

    RandomZero
    Member

    @randomzero

    Nevermind, found it.

    “/wordpress” should work without anything else, right?

    Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    No. Must be a real and complete URL, one that will be recognized by all machines.

    No.
    You can’t have both.
    It’s either localhost – and only you can see it, or it is a URL accesible from the net – and you cannot see it as “localhost”.

    RandomZero
    Member

    @randomzero

    Ok, that’s not going to work for me.

    With ICS, I can’t view my server using the DNS. So in order to access it I actually have to use the network IP..

    Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    Errr, what? You can use an IP address. http://1.2.3.4/blog/ will work just fine.

    The limitation is that it must be a URL. Not that it must have a name.

    RandomZero
    Member

    @randomzero

    If I try and access my server using the url (http://my.url.com) it won’t work from within my own network, but it works fine everywhere else.

    I can however, access my server from http://10.0.0.*, which is the network IP, from within my own network.

    I did originally have the wordpress url as http://localhost, which apparently worked when I wasn’t at home, but didn’t work when I was.
    So now it’s http://10.0.0.*, which does work on my home network, but I don’t know if it will work elsewhere.

    Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    If I try and access my server using the url (http://my.url.com) it won’t work from within my own network, but it works fine everywhere else.

    Ah. I see the problem. Your router isn’t allowing it to come back through. It routes it externally instead of realizing that it’s an internal address.

    Might need to change a router setting to fix this. On mine it’s called “Filter Internet NAT Redirection” and it needs to be turned off.

    But, I can guarantee you that no site name like localhost or the local IP will work outside your home network.

    RandomZero
    Member

    @randomzero

    Yeah, except I don’t use a router.
    It’s ICS(Internet Connection Sharing).

    I’ve got all the proper (Or so I think) ports forwarded, but it just refuses to work. Took me a week to realize the site actually worked..

    I have actually gotten it to work, and I found I can just log into phpmyadmin and change it in the options table.
    If worst comes to worst, I can just do that every time I want to access the thing..

    Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    ICS? Yikes. Spend the $20-30 and get a home router. Really, it’s worth it.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘[Resolved] No CSS on local computer’ is closed to new replies.