WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Symbolic Links to Files? (10 posts)

  1. willrosenbaum
    Member
    Posted 1 year ago #

    On my website, I have a bunch of links to files (mostly PDFs) that I am frequently updating. I would like to set up my server so that when I change my personal version of the file (which is not located in the public directory of my server), the change is automatically reflected in the version that appears on my website. I was hoping that making a symbolic link from my personal version of a file to a public directory (e.g. wp-content/uploads) would work, but it seems that I would need to change the owner of my personal version of the file to www-data, which I would prefer not to do. I was wondering if there is an easy work-around for this?

    Currently, I am using Dropbox as a work-around: I have symbolic links to my files in a public Dropbox folder, and my website links to the public link that Dropbox gives me for the file. This works fine, but it seems silly to me that I should rely on a 3rd party website to do something that I would hope would be easy to accomplish on my own server.

    Thanks in advance for your help!

  2. Joshua Parker
    Member
    Posted 1 year ago #

    I do something similar by using the download monitor plugin? With it, I can store files outside the document root, and whenever I need to update the file, I just overwrite the current one.

  3. willrosenbaum
    Member
    Posted 1 year ago #

    Thanks for your response! I'm not sure that plugin does what I want though. It seems as though I still have to manually upload the updated file each time I change it? I was hoping for something that would just automatically mirror my local copy of the file on my website each time I change the local copy.

  4. Joshua Parker
    Member
    Posted 1 year ago #

    Where is the local copy? How are you editing the local copy?

  5. willrosenbaum
    Member
    Posted 1 year ago #

    The local copy is on the the server that hosts my website, but not in my public directory. Usually, the file that I'm editing is a PDF that is generated from LaTeX, so I guess it is more correct to say the file is being overwritten rather than edited.

  6. Joshua Parker
    Member
    Posted 1 year ago #

    That's what I thought, so I don't understand why what I suggested does not meet your needs.

  7. willrosenbaum
    Member
    Posted 1 year ago #

    The problem seems to be that the local files aren't in the public directory of my server. I can enter the path the files and the plugin generates a link, but when I click on the link it just tells me that the download path is invalid... Maybe the problem isn't something that I can/should address from within WordPress, but instead I could cook up a shell script that takes care of it for me.

  8. Joshua Parker
    Member
    Posted 1 year ago #

    The files don't need to be in the public directory of your server. You set the directory to the files in the plugin. Then create links to the files that you add to your site's pages and you can mask the url, but that doesn't matter since it is not located in your public directory. And when you update the files, the download links will pull what you've updated. Whew.

  9. willrosenbaum
    Member
    Posted 1 year ago #

    Alright. I think I have everything sorted out and the download monitor plugin does in fact work. Thank you for your help!

  10. Joshua Parker
    Member
    Posted 1 year ago #

    No problem, anytime.

Topic Closed

This topic has been closed to new replies.

About this Topic