Support » Localhost Installs » wp development thru wifi not serving anything localhost referenced

  • Resolved thefeldkircher


    This is a new one on me. I am currently developing a new wordpress site for mobile. When I connect my devices via wifi and enter 192.168.1.x/wp_theme_builder which is the root of my wp install, I get everything except styles, scripts and images.

    I have narrowed this down to network net::ERR_CONNECTION_REFUSED errors reported in Google Developer Tools via usb debugging.

    Any script, style or image referenced by bloginfo('template_directory') for example, resolves to


    Therefore localhost is being denied when connected thru 192.168.1.x, anybody know how to fix this.


Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    You cannot use localhost as part of your site url if you want to be able to access the site from other computers in your local network. Every computer defines itself as localhost. You need to use an internal domain name. See Changing_The_Site_URL for details of how to change the site urls correctly.

    Hi esmi

    Thanks for the info, I changed both urls by using the functions.php method. Complete meltdown, desktop now has the same problem. Also couldn’t login, changed back to original urls.

    I am not really sure what I’m supposed to name them given that I have wp installed in my htdocs folder on my local dev machine. I will still have to connect using localhost/whatever/ which is served by xampp.




    Forum Moderator

    Yes I did, I have renamed the urls with variations of my wp install name:
    wp_theme_builder with and without localhost in the url.

    I am not trying to move the install, I am trying to test my site on android devices to see how they function and look with respect to the desktop version before release.

    Perhaps you could try to recreate my situation.

    Connect an android device to your wifi, open a browser enter in the address bar and see what gets returned. I get everything except those served from localhost such as images, styles and scripts.


    OK I have renamed localhost to in my hosts file, now both my wp url’s read


    But the problem remains when accessing via wifi on

    This is bizzare!

    OK the saga continues.

    As I said in a previous post I have renamed my localhost to I now access wp via wifi in a browser using 192.168.1.x/wp_theme_builder I still don’t get scripts, images and styles but now they are listed as 404’s and not err_connection_refused.

    Anybody have any idea how to fix this?


    OK I have found a solution, I am posting this here for anybody else who wishes to test wp via subnet wifi.

    Follow the instructions here

    Doesn’t matter which localhost your running just follow the instructions at the end for wordpress.

    My site now runs on all my devices, Nice.


Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘wp development thru wifi not serving anything localhost referenced’ is closed to new replies.