• [ Moderator note: moved to Fixing WordPress. ]

    How do I create a download link or button on my WordPress website for a .exe file? I have tried “Add Media” in WordPress and in Download Monitor and they reject the file type. I need for users of the site to be able to download an .exe file. Tracking how many download there have been would be a big plus.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You can put the ‘.exe’ file somewhere outside of WordPress on your hosting space, such as in the root directory. Then you can create a link and point to that file. For example:

    
    <a href="path-to-exe-file"> The link text </a>
    

    you need to create the custom code for count the no of downloads.
    Using ajax we can update the DB when click on download button and can show in Wp Admin.

    if you need any help, let us know

    [Signature moderated]

    • This reply was modified 7 years, 11 months ago by Andrew Nevins.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    @giri2014, Thanks for the help, I just have to ask you not to post a signature. Thanks again.

    Thread Starter projecttoday

    (@projecttoday)

    Thanks for responding Andrew Nevins and giri2014. Yes, this is what I want. But something strange has happened. My download page is now displaying a “Hello World” message instead of the download page. The download page displays in the dashboard. What gives?

    Thread Starter projecttoday

    (@projecttoday)

    I recreated the page and tried your suggestion, but it does not work. All it does is show the code itself. This is the code:

    <a href=”C:\users\owner\my documents\cronapacific\output\SELMS-setup.exe”> The link text </a>

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hi @projecttoday, the code should refer to a file on your server, as opposed to your personal computer.

    Try this:

    
    <a href="/SELMS-setup.exe"> The link text </a
    

    The forward slash at the start means the root directory of your website. That’s where you should put your .exe file. This is the folder where the ‘wp-content’ and ‘wp-admin’ folders are.

    Thread Starter projecttoday

    (@projecttoday)

    Okay. So by “your server” you mean the website host, which in my case is HostGator? How do I go about putting that file on HostGator?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    That’s right. HostGator should provide you with a tool named something like “File Manager” in the control panel (different to the WordPress dashboard). This gives you control of the files and folders of the website.

    Thread Starter projecttoday

    (@projecttoday)

    I uploaded the file to the site, though I’m not sure if I got it in the right folder. But when I view the page, there is no link, just the code itself:

    <a href=”/SELMS-setup.exe”> The link text </a>

    What is wrong?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Are you adding the link to the Text editor?

    Thread Starter projecttoday

    (@projecttoday)

    Okay. Put it down below under Text. Now when I click I get:

    404
    Page not found

    Something wrong with the code or is the file in the wrong folder?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Maybe the file is in the wrong folder, can you let us know where exactly it is from your File Manager?

    Thread Starter projecttoday

    (@projecttoday)

    /home2/projecttoday/public_html

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    That sounds right, would you be able to show us the page that has this link?

    Thread Starter projecttoday

    (@projecttoday)

    An image? How do I upload that? “img” is asking for a URL

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Create a download button or link for an .exe file’ is closed to new replies.