Support » Localhost Installs » Links to local network drives/folders

  • Hey there,

    we are running a WordPress intranet-site on a server inside our network, it can only be reached inside our domain.
    On one page, I want to provide links to local folders, e.g.
    S:/folder/folder/file.xlsx

    Whatever I do, I don’t find a way to make these work.
    The users have rights to open/modify files on S:/folder/folder/file.xlsx,
    but I’m not able to provide a working link from the intranet site to a local folder.

    Thanks for your help!




Viewing 5 replies - 1 through 5 (of 5 total)
  • Modern web browsers have strict security restrictions regarding linking to local file systems from web pages. This is to prevent malicious web pages from accessing or modifying local files. Therefore, such links often do not work directly in browsers like Chrome, Firefox, or Edge.

    Here are a few suggestions for linking to local folders from your internal WordPress site:

    1. Map the network drive as a Windows share. Then you can link to it using the UNC path like \server\folder\file.xlsx. Users would already have access to the shared folder.
    2. Upload the files directly to the WordPress media library. Then you can provide links to those uploaded files.
    3. Set up an internal web server or file-sharing service that exposes shares via HTTP. For example, you could install Apache or Nginx on the file server and configure it to share certain folders over HTTP. Then link to those paths from WordPress.
    4. Consider using a self-hosted file sync and share application. These can expose local file shares via web interfaces and generated links. They may integrate better with WordPress than options 1-3.
    5. As a last resort, instruct users to map network drives themselves. Provide the UNC path in your page content (like \server\folder) for users to manually map the drive letter. Not elegant but avoids web server configuration.

    The cleanest approach is likely setting up a proper internal web server (Apache, Nginx, etc) to expose the file shares over HTTP. That integrates with WordPress linking and avoids drive mappings for your users. Let me know if any of those options need further clarification!

    Thread Starter harrysantos

    (@harrysantos)

    Thanks a lot for your reply.
    I will ding into this with our it-department.

    One question to solution 1:
    Lets say I want to link to files in S:/Folder.
    Users alredy have access to this folder in windows explorer.

    Do I have to map the folder nevertheless?

    Yes, modern web browsers have strict security restrictions regarding linking to local file systems from web pages, no matter if users have access to those files or not.

    It’s also possible to set file protocol links for use with your files on WordPress (assuming all other file accessibility issues have been handled).

    Use the file:/// protocol followed by the local path. For example: <a href=”file:///S:/folder/folder/somefile.xlsx”>Link to Some File</a>

    I think the smart solution comes from google drive. You can use the plugins https://wordpress.org/plugins/integrate-google-drive/

    Effortlessly manage and share your Google Drive documents and media files right on your website.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.