Support » Localhost Installs » Enqueuing scripts/stylesheets, Local Area Networking users getting 404

  • Resolved elliott greaves


    I am developing buddypress using a WAMP server.

    My enqueue_Script/Style functions work fine when viewing the theme on the PC the wamp server is installed on.

    I run into issues when I am accessing the wordpress installation over the local area network from another PC, Tablet Device or Smartphone as content_url, bloginfo(“template_url”) and get_template_directory_uri() all return a string that includes http://localhost/ at the beginning, This works fine on the machine that’s running the localhost testing environment but for other users on the network it causes a 404 as http://localhost does not exist.

    If anybody knows of a solution to this problem it would be greatly appreciated.

    Thank you for reading, and thank you your time.

Viewing 1 replies (of 1 total)
  • I solved the issue myself. It was nothing to do with the code.

    It was to do with the WordPress settings on the WordPress installation itself.

    In the general settings, I had to change the “WordPress Address (URL)” && the “Site Address (URL)”.
    When I installed WordPress the “general settings” -> “wordpress address (URL)” && “General Settings” -> “Site Address (URL)” default values haVE “http://localhost/” at the beginning; So I swapped “http://localhost/” for an “IP address” that everyone on my LAN had to type into their browsers to access the localhost installation in the first place.

    On windows find that IP address by opening command prompt and typing “ipconfig”.

    It will be under “Ethernet adapter Local Area Connection:”
    and it will be the IPv4 Address.

Viewing 1 replies (of 1 total)
  • The topic ‘Enqueuing scripts/stylesheets, Local Area Networking users getting 404’ is closed to new replies.