Support » Installing WordPress » Apache, Mac, Web Server Question …

  • Hi,

    I have a number of various wordpress installs running on my local machine (Mac with Apache, mysql, php-engine). On my local machine and on my local network everything works perfectly (at, http://192/168.1.100/~myusername).

    However, when I access my local machine from afar (through my public IP address) I still can get my wordpress sites, however, the THEMES are missing. There is no CSS being loaded, no graphics, nothing. Just plain, unformatted text with no graphics.

    I remember having a problem like this before when I changed the root directory or something; but, anyhow:

    Does anyone know what would cause this to work on the local network but not publicly ?

    PS: bbpress installs and drupal installs all do the same thing so I know it is not wordpress, just don’t know how to fix it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    I noticed that it seems WordPress interpreters my “root” directory to be my computer name (e.g., http://damons-computer/wordpress/ ) when it processes all of my generated links in the HTML from the remote machine.

    However, if I am afar, it seems to need to insert the public IP address for all of the links/images/etc to work.

    Any idea how to get wordpress to link to the correct location so a remote user can get to my images and files ?


    I found that if I change my “website address” and “blog address” under admin/options, to the public IP address, remote viewers can access the site — however, I can no longer get it on my local machine and had to change it back.

    Is there any way to configure the mod_rewrite file or .htaccess file to update the links accordingly so both work ?


    You need to use the public IP address in the WP options boxes then edit your computer’s hosts file to load the address locally.
    Try adding your.ip.address
    Extra information here:

    Hi Ian — do you know where this “hosts” file is on a mac with Apache ?

    err, do you have a “etc” or “/etc” by chance?

    There is a full how-to here and an alternative (which I knew nothing of) using NetInfo Manager.
    [Note you will probably be needing to log in with admin rights to do this]

    Hey, yea, I found it under /private/etc/ — there is a “hosts.lpd” file there.

    I don’t have a dynamic DNS setup anymore (mind expired) but were I to, I would write: my.dynamic.dns ?

    Would it work with the public IP address that is shown at ? Such as: ?

    There is nothing in my hosts.lpd file just now.

    You should have a hosts file as well as hosts.lpd in that folder. It is hosts that you want to edit. With a clean install mine reads:
    # Host Database
    # localhost is used to configure the loopback interface
    # when the system is booting. Do not change this entry.
    ## localhost broadcasthost
    ::1 localhost

    What you are planning should work though. As an IP address might change, setting up a new dynamic DNS might be easiest.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Apache, Mac, Web Server Question …’ is closed to new replies.