• Resolved thefeldkircher

    (@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

    http://localhost/wp_theme_builder/..........

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

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • 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.

    Thread Starter thefeldkircher

    (@thefeldkircher)

    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.

    Regards

    Thread Starter thefeldkircher

    (@thefeldkircher)

    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.

    Thread Starter thefeldkircher

    (@thefeldkircher)

    Perhaps you could try to recreate my situation.

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

    Thanks

    Thread Starter thefeldkircher

    (@thefeldkircher)

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

    http://dev.com/wp_theme_builder’

    But the problem remains when accessing via wifi on 192.168.1.4/wp_theme_builder

    This is bizzare!

    Thread Starter thefeldkircher

    (@thefeldkircher)

    OK the saga continues.

    As I said in a previous post I have renamed my localhost to dev.com 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?

    Regards

    Thread Starter thefeldkircher

    (@thefeldkircher)

    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.

    Regards

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.