This is a revision of an Old one and going over new options for achieving the same results. How to set up a file to download and not open in the browser. If you want to manually code this into a theme – Visit the old – Make a File Download Link Part #1

For those of you that would like to use a plugin to configure the download here are the options below:
Download Manager
File Base Download Manager
WP-Download Manager

Those 3 options above will help you get download links set up to manage your Downloads.
If you really want to do it with code –

Visit the post – Make a File Download Link Part #1