How to Add a Downloadable File with WordPress (with Video)

Last updated - August 17, 2022

A direct download link is a useful tool to share resources with your viewers, visitors, and customers. When someone clicks on the link, the file is instantly and automatically downloaded on their device.

Downloading a file
Clicking on a direct download link automatically triggers a file download.

So here are the steps to add a downloadable file using your WordPress website:

Step 1: Choose the file that you want to be downloaded. It can be in any format like image, video, document, or pdf. Right click on the file and click on the “Add to filename.rar” option.

The file will then be converted into a zip folder. If you don’t have a compressing software like WinRAR, you can download it for free.

Compressing a file to make it a downloadable file
Compressing a file using WinRAR.

Step 2: Next, we need to upload the file in our WordPress media library. In your WordPress dashboard, hover your mouse pointer over the “Media” tab and click on “Add New”. On the next page, click on “Select Files” and upload the newly created zip file.

uploading a file to WordPress
Uploading the zip file to the WordPress media library.

Step 3: After the file has been uploaded to your WordPress media library, click on the “Edit” button on the right side of the file name.

Step 4: In the editing menu, a URL is assigned to the file in the top right section. This is the URL you’ll need to create a downloadable file with WordPress. Click on the “Copy URL” button below it.

Edit media section in WordPress
A file URL is assigned to every file uploaded to the media library.

Step 5: With the file URL copied, go to any post or page on your website. Select a word or a phrase and click on the link icon. Then, paste the URL and press Enter.

You can similarly link an image, button, or any other element so that when the reader clicks on it, the download is triggered automatically.

Hyperlinking in Elementor
Creating a direct download link using the file URL.

This way we can link various file types with different elements to create downloadable files with WordPress. You can use them to share images, documents, guides, infographics, templates, and other useful resources with your visitors.

If you have any doubt about the process above, reach out to us in the comments below.

Check the video below:

Further reading

8 COMMENTS

  1. Bro, not working. When i click the button, its nothing happen. does it have to be hosting?

    • Hi, Can you let me know what is the issue and which is not working?

    • Hey Fardeen, the video at the end of the blog may help. If it doesn’t, let me know where you’re getting stuck or what exactly is not working.

  2. Nice tutorial! You can also use WP File Downloads that has a dashboard that will helps you with everything and also allows you to connect it with cloud services like Google Drive in order to serve files directly from there!

    • Thanks for the plugin suggestion Williams. And glad you liked the tutorial.

  3. Hello Friends,

    You can attached any download file in wordpress with this free plugin. Product Attachment for WooCommerce

    Key features:

    – Multiple attachments can be added
    – Attachments can be downloadable in the Order details OR Product Detail pages.
    – This Attachment is set status(Pending payment, Processing, On hold, Completed, Cancelled, Refunded, Failed) after that match this status then auto enable on each order download available.
    – Set auto expiry date for order attachment ( Download link Expire)
    – Enable attachment on Product page.
    – Any type attachments you can attach with order
    – Add Attachment in all products.

    Check this plugin video: https://www.youtube.com/watch?v=w6PxtXKwG60

LEAVE A REPLY

Please enter your comment!
Please enter your name here