you may try to add this to your .htaccess :
<FilesMatch "\.(?i:pdf)$">
# Force File Download
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
Related Posts:
- Adding Files to Page Only Adds Title, Doesn’t Create Link
- Add hyperlinks in media description
- Add link to media files in backend and modify linked images in the frontend
- How to Protect Uploads, if User is not Logged In?
- Delete an attachment in the WP media modal window
- Cleanup uploads folder, Media Library db structure
- Rendering the uploaded file in a wp.media object
- WordPress Image Editor not working – conflict?
- WordPress Media Manager 3.5 – default link to
- Failed to import media from a local wordpress site to a live one
- Is is possible to crop an image after uploading
- Rename “Add Media” Button To “Add Images”
- How would I go about listing only unattached media in say a sidebar?
- Filter what image sizes get generated
- Change default tab of media manager
- Is email post notify visitor on new media upload possible?
- Restricting access to files within a specific folder [duplicate]
- get total number of images from media using xml-rpc
- Audio Playlist : How to bind events for “track change”, “track end”?
- Plugin to download attached media files?
- Failed media import
- Upload mobi and epub file in the MEDIA of WP
- Change WordPress’ media upload URL?
- Image archive without date
- Disable edit option in Media library
- How to get an image url from media library
- Uploading Media gives error “Missing a temporary folder.”
- Media is shown in listview but not in gridview whenever i activate my Custom Theme
- Disable mouse image resizing in editor
- Generated media have incorrect aspect ratio
- How to insert an Audio Player in a Post or Page?
- Proper way to change the path of uploads folder for existing WordPress site
- wp.media edit attachment screen
- 3.5 Media Manager – callout in metaboxes
- What is the structure of the “Featured Image” field in the DB?
- Force WordPress, themes & plugins into using defined sizes
- Add instructions For Media Library Uploads
- Audio file’s length (duration) is missing from Attachment Details in Media Library [closed]
- Media Manager: refresh library after new selection
- WordPress Media Image Manager — Creating Lots and Lots of Odd Sized Images
- Large image size stuck on old value, even for new images
- Can I force all uploaded images to be reduced in quality?
- Cannot upload anything via wordpress
- Video uploaded with the native media uploader gives Error 404
- Audio Player for MP3 Files for WordPress
- How select multiple document as like media gallery
- Rebuild the entire WordPress uploads folder
- See List View – or Image titles- of Media Library when “Add Media” button is used
- adding images column to admin edit columns not working for SVG
- It is possible to add custom media size in admin media edit?
- Limit number of images to upload in wp.media function
- Moving media between blogs changes the URL subdirectory [closed]
- Link to resized media file
- Allow Editor Role to Edit Media
- Error: Warning: strpos() in media.php
- Bulk image importing from folders
- Custom controller for video that is added from editor
- How to get media source of text editor in WordPress
- WordPress media file link with fancybox
- how to upload file to media library using link [closed]
- Editing image dimension – to edit the main image file
- Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?
- Upload video in custom folder
- Force image crop size in media editor
- Set Maximum Width for an uploaded image
- Too slow Image upload in WordPress Media Library as image number increases
- Use staging media files on development site in WordPress
- Getting a specific value out of array using get_attached_media
- WordPress 3.6 native player is not responsive?
- Thumbnail images chopped off but not cropped to exact dimensions
- Uploading a media item with the wp-json API to a specific path
- Unable to add logo or header [closed]
- How to disable (and hide) the Media Library for certain users?
- Get all media from wp-json/wp/v2/media
- Publish / unpublish media items in the media library
- Use media files from a different server just for one custom type
- How to get all id_attachment with one loop?
- Media Library modal customization
- IPTC and custom thumb size
- Disable Responsive Image Sizes crop
- Media isn’t showing in WordPress library but is available in uploads folder
- Append Media/Attachment IDs to Gallery Shortcode HTML Output
- Media Library not loading
- How do I get WordPress to create resizes of a supplied default image in a theme?
- Creating multiple instances of Media Uploader
- MP4 file links download instead of playing
- Media and all images disappeared from my wordpress site
- TwentySeventeen $content_width not updated in admin
- Get the Playlist embedded in Post/Page content
- Can we reuse WordPress drag drop media upload in plugins?
- How can I change the default image behavior?
- How to create different media uploader frames / filter library depending on a custom action
- Import media in bulk with caption and titles?
- cant able to upload media to my wordpress blog
- Change image in media library at specific time
- Import of 200+ sermons
- After import, oEmbeds non-functional until manual republish
- Add custom css class to wp-list-table row for Media Screen
- WordPress MediaElement audio player won’t seek and resets back to the start when files are locally hosted
- Automatic image conversion to HEIF breaks Gallery on Safari