WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to make a file available for download? (7 posts)

  1. klajdi2
    Member
    Posted 7 years ago #

    I want to upload a file and make it available for visitors to download.
    I can see the form to upload it but I don't understand how will I connect the file with my post.
    I have seen on other blogs "Click here to download"
    How can I do this?

  2. MichaelH
    Member
    Posted 7 years ago #

    Assuming you have a file called myfile.zip--you could put that in a folder downloads (public_html/blog/downloads) so just put a link in your post to http://yourdomain.com/blog/download/myfile.zip

    If you want to use a file that you've already uploaded, then in Manage->Uploads click on the upload, then copy and paste the URL into the post where you offer the link.

  3. klajdi2
    Member
    Posted 7 years ago #

    Thank you

  4. shamskabra
    Member
    Posted 7 years ago #

    And what if I dont have blog and downloads forlder under my public_html forlder. ? I cant find these folder in my Cpanel's file manager. Please advice

  5. whooami
    Member
    Posted 7 years ago #

    And what if I dont have blog and downloads forlder under my public_html forlder. ? I cant find these folder in my Cpanel's file manager. Please advice

    The directories Michael named are examples. Put them wherever you want -- if you don't have a directory, you make one.

  6. animediaz
    Member
    Posted 6 years ago #

    I am still confused can anyone help!

  7. veevee
    Member
    Posted 6 years ago #

    Yeah, quickly, browsers deal with different kinds of files in different ways. So when a browser hits a page with the .html extension, it reads it and interprets the code. Other file types are dealt with differently. When a browser hits a .zip file, it downloads to the users desktop (or asks the user if they want to download it). So if you upload a file called 'package.zip' to the root directory of your website (we will use http://www.example.com) and then place this hyperlink reference in a post:

    <a href="http://www.example.com/package.zip">Click to Download!</a>

    it will display a link to your file

    Click to Download!

Topic Closed

This topic has been closed to new replies.

About this Topic