New

The new HostCloud is live. Web Hosting for ₹1 for your first month.

Web Hosting for ₹1 · first month

Claim offerClaim
WordPress

Selling digital downloads on WooCommerce: file protection, download limits and licence keys

Learn how WooCommerce protects downloadable files, which download method to use, how to limit access and when you need licence keys.

13 November 2026 · 9 min read
Selling digital downloads on WooCommerce: file protection, download limits and licence keys

Selling digital downloads on WooCommerce: file protection, download limits and licence keys

TL;DR: WooCommerce protects downloadable products by serving files through a protected path and giving each buyer a time-limited, count-limited link after payment. Choose the download method that fits your server (Force Download, X-Accel-Redirect or Redirect), keep files in the protected uploads folder or off-site storage, set expiry and download limits and add a licence-key plugin if you sell software. No method stops a determined buyer from sharing a file, so combine access control with watermarks, account-bound licences and clear terms.

How WooCommerce delivers downloads

When you mark a product as Downloadable, WooCommerce stores the file location and generates a download link for each order. The link is tied to the order and customer, can expire and can have a download limit. The files are normally kept under a protected woocommerce_uploads directory so visitors cannot browse them directly. See the official WooCommerce documentation for current behaviour.

Diagram of protected download delivery: order, authorised link, server-assisted file delivery with limits and expiry

Download methods

WooCommerce offers methods for how the file is sent (Settings, Products, Downloadable products):

Method How it works Notes
Force downloads PHP reads and streams the file Works everywhere, but uses PHP and memory for large files
X-Accel-Redirect / X-Sendfile The web server sends the file after PHP authorises Best performance when your server supports it
Redirect only Sends the user to the file URL Least secure, since the URL can be shared

For large files, use a server-assisted method or external storage. See server limits and PHP memory.

Protect the file folder

  • Keep the protected folder blocked from direct access in Apache or Nginx. Test a direct URL to a file and confirm it fails.
  • Use unguessable file names.
  • For large or many files, use external storage with signed, expiring links.
  • Do not put paid files in the public media library.

Limit access

  • Download limit per purchase (for example 3 downloads)
  • Expiry in days
  • Login required to download
  • Disable guest checkout for high-value files so links belong to an account
  • Revoke access when you refund an order

Licence keys

For software, plugins or themes, a licence system adds activation limits, updates and revocation. Options include WooCommerce's own software licensing extension, third-party plugins and Easy Digital Downloads' licensing extension. See WooCommerce vs Easy Digital Downloads. Bind each key to a domain or account and set renewal and update rules.

Reduce piracy and sharing

  • Watermark PDFs and videos with the buyer's name or order number
  • Use streaming or DRM for video where needed
  • Issue updates only to licensed users
  • Write clear terms of use. See terms of service and privacy policy
  • Monitor for leaked files and send takedown notices

Hosting and reliability

Large downloads stress memory, bandwidth and PHP timeouts. Test with realistic files, use caching and a CDN for public assets and monitor errors. See WooCommerce hosting needs and managed WooCommerce hosting.

Privacy

Order and download logs contain personal data. Include them in your data map and retention rules. See DPDP checklist for small businesses.

FAQs

How does WooCommerce protect downloadable files?

By storing them in a protected folder and giving each order a controlled download link.

Which download method should I use?

Use X-Accel-Redirect or X-Sendfile if your server supports it, otherwise Force Downloads.

Links can be shared, so use limits, expiry and accounts.

How do I limit the number of downloads?

Set a download limit and expiry on the product.

Do I need licence keys?

For software that should be activated on limited sites, yes.

Can I store files outside my server?

Yes, with external storage and signed links.

Why do large downloads fail?

PHP memory, timeouts or server limits. Use server-assisted delivery.

Can I stop piracy completely?

No, but you can reduce it with licences, watermarks and terms.

Conclusion

Use a protected folder, a server-assisted download method, expiring links and account-bound access. Add licensing for software and watermarks for documents, and test with real files on your actual hosting.

HostCloud helps Indian websites with reliable hosting, domains and support. See the options at https://hostcloud.in.

Sources:

Related posts