/
Welcome Guest!

How to force download media files on wordpress

Hello guys,

For those of you that want to add the features of auto downloading to your wordpress website, for your users to be able to download any media files.

CHECK: Introduction to Blogging what you should know before get started

  • Login to your cPanel
  • Click on file manager
  • open puublic_html folder
  • make sure, your hidden files is visible
  • Then, add the below code to your .htaccess file
  • <FilesMatch "\.(mov|mp3|jpg|pdf|mp4)$">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </FilesMatch>

    ForceType application/octet-stream
    Header set Content-Disposition attachment
  • Save it and it should be working fine.

ALSO CHECK:  How to Move WordPress from a Subfolder to the Root Directory(Opens in a new browser tab)

If you face any error on this, feel free to drop comment and we are always here to provide help.

Post Your Comment

Leave a Reply

The entirety of this site is protected by copyright © 2019 AbollyHost.com.