• Hi guys,

    So I have recently upgraded to a self-hosted Word Press, and so far I’m really liking how much I can customize my site. However, one thing I am having issues with is linking to files that are not from wp uploads.
    For example: I want to be able to link to stevenD.net/downloads/my_download.zip, or stevenD.net/podcast/episode-1.mp3, instead of stevenD.net/wp-content/uploads/2019/09/episode-1.mp3.
    Is there a way I can link to files that are on my server but not in wp-content?
    Thanks!

    • This topic was modified 4 years, 7 months ago by stevendnet.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You add links to external stuff the same way you add any link. They don’t have to be local. Click on the “chain” icon. See https://i.imgur.com/JpQnAro.png

    .

    Also, take a look at this plugin: https://wordpress.org/plugins/external-media-without-import/

    Thread Starter stevendnet

    (@stevendnet)

    Okay, I’ll take a look at that plug-in.
    What I meant though was that when trying to visit a url, such as stevend.net/podcast/episode-1.mp3, WordPress will:
    -Take that URL, and search for it as a page on the site.
    -Return not found, since /podcast/episode-1.mp3 is not a page on my wordpress site.
    -Redirect me to a page not found page in my site because it couldn’t find the file I tried to link to because although it’s uploaded to my server, it is not registered in wordpress’s content as a page, post, category, or tag, so wordpress blocks my accessing it. Whereas, if I did not have wordpress installed and instead had a custom coded homepage, I could visit stevend.net/podcast/episode-1.mp3 since podcast is a directory in /var/www/html, and episode-1.mp3 is a file within that directory.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Put in in fully qualified: https://stevend.net/podcast/episode-1.mp3.

    Why are you not putting these files in the media library?

    Thread Starter stevendnet

    (@stevendnet)

    Well, podcast/episode-1.mp3 was just an example to try and demonstrate the problem in a real-world example. I could also want to refer to an external php script.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Linking to external files on my server?’ is closed to new replies.