The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

WordPress | Audio player – Forced Download

  • # March 1, 2013 at 4:00 pm

    Hey guys,

    My names Andy and I am an absolute novice. I’d really really appreciate any help anyone is able to give to help me fix my problem!

    I have WordPress Audio Player and I am uploading all the MP3s to my FTP, and then writing the links back into WordPress.

    I wish to host an MP3 for listening, and then a separate link (Perhaps reading ‘Download’) where users are able to download the the track without being redirected to another page and having to right click save as.

    I’m after a solution for a forced download if anyone has one?

    Thanks so much guys, really appreciate it.


    # March 1, 2013 at 5:59 pm

    In the [.htaccess section of “Snippets”]( check out the title [Force Files to Download (Not Open in Browser)]( and add:

    AddType application/octet-stream .mp3

    Also, there are [WordPress plugins that take care]( this for you.

    Hope that helps,

    # March 2, 2013 at 7:40 am

    That’s great Alen! Thank you!

    I’m stuck as to what I should open, and where I should put this snippet though? I have no idea about .htaccess!
    Sorry for the lack of knowledge… Any ideas?

    # March 2, 2013 at 9:32 am

    .htaccess file is Apache server configuration file. It is hidden by default ([.] before file name in Linux means file is hidden). This file can be found at root level of your website. So whatever default directory you log-in via FTP. Most FTP clients by default ignore any file starting with [.]! So make sure your FTP program is configured to display hidden files and you’ll see .htaccess file. Then just download it, edit and re-upload overwriting the old one. (Remember to back-up original copy)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed