• Resolved Buzzingrobot

    (@buzzingrobot)


    I have a two-machine little wireless net at home. A Windows machine serves as a WP development server. When accessed from the other machine, a Mac, CSS,images, etc., are not found.

    I assume this has to do with the fact that the refs to such things are absolute paths to files on the Windows machine, which are appearing as: “https://localhost/wordpress/……./style.css” .

    Obviously, “localhost” is the Windows machine, and URLs like that aren’t resolving on the Mac (which is its own local host).

    Things work if I hardcode IP-based URLs into the WP code.. But, there must be a better way. How can fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Buzzingrobot

    (@buzzingrobot)

    OK, I can answer myself. In Settings, I replaced “localhost” with the IP address of the machine hosting WP in both the “WordPress address” and “Site address” entries. Now, all the ref’s are generated with the IP.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Alternatively, consider using a local naming scheme. *.local is popular sometimes.

    To do this, edit your HOSTS file on both machines. On Windows it’ll be C:\Windows\System32\drivers\etc\hosts and on a Mac it’ll be in /etc/hosts or /private/etc/hosts or you might have to use some weird Mac specific thing (I don’t use Macs).

    Anyway, then just give the computers local names and set their IPs accordingly in the hosts files and you can then reference them by name. bob.local or bill.local and so on. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Localhost URL's Not Resolving On Local Development Network’ is closed to new replies.