How to Create a Download Button in WordPress

Do you have a website where you want to offer free digital downloads such as photos, software, e-books, documents, songs, graphics, or any other type of media file? Creating a free download button can really help make the process easier by allowing your visitors to directly download a file.

How to Create a Download Button

1. Download and install the Easy Media Download plugin (Easy Media Download is a WordPress Download plugin that allows you to create a download button beautifully with a shortcode).

2. Create a new post/page or edit one and insert the following shortcode into the editor (Make sure to paste as plain text in the visual editor):


[easy_media_download url="http://example.com/wp-content/uploads/file.zip"]

All you need to do is replace the example URL with the actual URL to your file. The file can be hosted anywhere. The download button will work as long as the URL is public and accessible in your web browser.

screenshot of a download button in WordPress

How to Create a Download Button for a ZIP file


[easy_media_download url="http://example.com/wp-content/uploads/file.zip"]

How to Create a Download Button for a Music/MP3/Audio file


[easy_media_download url="http://example.com/wp-content/uploads/test-song.mp3"]

How to Create a Download Button for a Software/App/Plugin


[easy_media_download url="http://example.com/wp-content/uploads/my-program.exe"]

How to Create a Download Button for a Photo/Image


[easy_media_download url="http://example.com/wp-content/uploads/cool-pic.jpg"]

How to Create a Download Button for a Document


[easy_media_download url="http://example.com/wp-content/uploads/my-file.doc"]

How to Create a Download Button for a PDF/e-book


[easy_media_download url="http://example.com/wp-content/uploads/my-book.pdf"]

How to Create a Download Button for a Video


[easy_media_download url="http://example.com/wp-content/uploads/cool-vid.mp4"]

Disclosure: This page may contain affiliate links. If you follow one of those affiliate links and purchase something it will provide me with a little bit of a commission. This costs you nothing extra but helps maintain my site, free plugins, and themes. So I thank you for your support.

7 thoughts on “How to Create a Download Button in WordPress”

  1. Will this download button help count number of downloads? If no, please tell me the one to use for downloads+counts.

    Thanks.

    Reply
    • @Dave, If you use my simple Google Analytics plugin you might be able to track the number of downloads in your Google Analytics account.

      Reply
      • Might?… Are you saying I have to install both plugins to count my downloads?….

        I created a custom download button already using CSS. Will my Google analytics account help me count downloads through that?..

        Reply
        • @Ashiuloka, I haven’t personally tested the integration. But the code is there to track each click.

          Reply
  2. it is not downloading automatically …it is just redirecting me back to my link post

    Reply
    • @Joel, Please provide a link to the page where you have the download button.

      Reply
  3. Hi your plug in is working, thanks and I set it up to open a PDF of mine in a NEW tab. Great! But unfortunately it opens the PDF at more than “actual size”. It’s huge on my screen and the first image is pixelating. So I cannot use it unless you can add a snippet to tell the browser to open it by default at 100% or “actual size”? It just looks ugly as its an image. If it was just text it would be okay i guess.

    Secondly, I was hoping it would just download straight away onto their computer. but then again I am using safari. I added your snippet to “Force download” but you say that doesn’t work on safari so maybe it will work on other browsers i don’t know.

    Reply

Leave a Comment