Product8 min read

WooCommerce downloadable product setup: limits, expiry and a real customer test

Share

A good WooCommerce downloadable product setup takes a few minutes, but small choices decide whether buyers get their file, whether strangers can grab it for free, and whether the order sits waiting for you. This guide walks through the product checkboxes, download limits and expiry, the store-wide download settings, and a customer test order that confirms the file arrives.

Older WordPress Media Library screen in list view, showing uploaded images, audio and video files. It is a general illustration of file uploads, not a WooCommerce downloadable product screen.
Older WordPress Media Library screen in list view, showing uploaded images, audio and video files. It is a general illustration of file uploads, not a WooCommerce downloadable product screen. WordPress.org. Source details. Resized and converted to WebP.

What the Virtual and Downloadable boxes change

WooCommerce treats two ideas separately. Downloadable means the customer receives one or more files. Virtual means nothing is posted, so WooCommerce removes the shipping fields and skips the shipping calculator in the cart and checkout.

Ticking only Downloadable keeps shipping in play. WooCommerce designed it that way so you can sell a physical item with a digital extra, such as a device that comes with a downloadable manual instead of a printed one. For an ebook, template, audio album or software file with no parcel attached, tick both boxes, otherwise customers face shipping calculations for something you never send.

On a simple product, both checkboxes sit beside the product type in the Product data panel. On a variable product, each variation has its own Virtual checkbox, so a single product can offer a boxed version and a download-only version side by side. The official guide to virtual and downloadable products covers both layouts.

Add the file, download limit and expiry

Once Downloadable is ticked, three new fields appear in the General section of the Product data panel. Work through them in order on a new simple product.

Think about the limit and expiry before you type numbers. A limit of three gives a buyer room for a failed download and a second device, while a blank field allows unlimited downloads. Expiry counts days from purchase, and a blank field means the link never expires. Short limits and expiries end access sooner, so a genuine customer who returns months later will find the link no longer works and will need your help, which is why the values should match what you are selling.

  1. Go to WooCommerce > Products > Add Product and choose a simple product.
  2. Tick Downloadable, and tick Virtual as well if nothing ships.
  3. Click Add File and give the file a clear name, because customers see it.
  4. Click Choose File to upload or pick from the Media Library, then click Insert. For a file hosted elsewhere, enter its full URL instead.
  5. Enter a Download limit if you want one. Once a customer reaches it, they can no longer download the file.
  6. Enter a Download expiry in days if you want links to stop working after a set period.
  7. Click Publish or Update.

Choose a download method and access rules

The product page controls what is sold. The store-wide rules for how files are handed over live under WooCommerce > Settings > Products > Downloadable Products, and they deserve a deliberate decision rather than whatever was set at install.

The File Download Method matters most. Force Downloads serves files through a PHP script, keeps direct links hidden and limits access to purchasers. X-Accel-Redirect/X-Sendfile offers the same protection with better performance and support for larger files, but your hosting provider has to support X-Sendfile or X-Accel-Redirect, so ask them before switching. Redirect only sends the buyer straight to the file address and leaves the file open to outside access. WooCommerce advises using one of the first two methods and keeping Redirect only for troubleshooting or files you are happy to leave unprotected.

The access restrictions underneath the method suit different kinds of shop, and the products settings page describes each one in full. A digital-only store that wants buyers signed in relies on the login rule, a store mixing parcels with downloads needs a decision on the grant-access box, and anyone allowing guest checkout should remember that the login rule does not reach guest purchases.

  • Downloads require login: customers must sign in to download. Guest purchases are not affected.
  • Grant access to downloadable products after payment: unlocks downloads when an order is Processing rather than waiting for Completed.
  • Open in browser: displays files such as PDFs in the browser instead of saving them by default. Customers can still save them, and the option does not work with redirects.
  • Append a unique string to filename: adds randomness to the stored filename to discourage link sharing.
  • Count partial downloads: counts a download when only part of a file is fetched, so limits still apply to interrupted or ranged downloads.

How order status decides when downloads unlock

Download access is tied to order status, and that catches out plenty of new digital stores. An order containing only products that are both virtual and downloadable skips Processing and moves straight to Completed, so the buyer gets access as soon as payment goes through.

Mixed baskets behave differently. Add a physical item, or a downloadable product without Virtual ticked, and the order stops at Processing like any shipped order. Without the grant-access setting from the previous section, the customer waits for the file until someone marks the order Completed. For stores selling physical goods with digital extras, decide whether buyers should get files at payment or at fulfilment, and set that box accordingly.

Order emails are part of the same journey. When your test order completes but no confirmation arrives, work through the steps for WooCommerce order emails not sending before blaming the download settings.

Test the customer download properly

Seeing the file open while you are logged in as an administrator proves very little, since your account has wider access than a buyer. A meaningful test follows the customer path from a clean browser.

Each step confirms one observation. A file that downloads in the customer session shows the buyer can reach it. A link that refuses to work in a signed-out window shows your login rule is active for that link. Neither proves the limit or expiry is counting correctly unless you deliberately reach the limit, so test that on a cheap dummy product rather than assuming it.

  1. Open a private browser window and register or sign in as a test customer, not an administrator.
  2. Buy the product using a payment option you can safely complete and reverse.
  3. Check the order in WooCommerce > Orders and note its status: Completed for a virtual and downloadable-only order, Processing for a mixed basket.
  4. Find the download link in the customer's confirmation and account area, click it and open the file to confirm it is the correct, complete version.
  5. Copy the download link into a separate signed-out browser. With Downloads require login ticked, it should not hand over the file.
  6. On a low-limit test product, download until you pass the limit and confirm access stops.

When the test fails, change one thing at a time

Missing access on a Processing order points first at the order status and the grant-access setting. A link that fails for every customer while the file exists points at the download method, particularly X-Accel-Redirect/X-Sendfile on hosting that does not support it. Switching temporarily to Redirect only can show whether the method is the cause, but switch back once you know, because that option leaves files unprotected.

Stores running since WooCommerce 6.5 also have Approved Download Directories under WooCommerce > Settings > Products > Approved Download Directories, which manages where downloadable files are stored and served from. Files kept outside an approved location are worth checking there.

Make settings changes on a copy of the shop where you can, then carry them over carefully, following the approach for moving WooCommerce staging to live so newer orders are not overwritten. After every change, repeat the customer test rather than trusting the setting screen.

Sources

WooCommerce downloadable product setup FAQs

Should I tick Virtual as well as Downloadable?

Tick both when nothing is posted to the customer. Downloadable alone keeps the shipping fields and charges shipping at checkout, which suits a physical product bundled with a digital file.

What happens if I leave the download limit and expiry blank?

Customers get unlimited downloads and the link never expires. Set a limit or a number of days only when you want to restrict how many times or how long a buyer can download.

Which file download method should I choose?

Force Downloads protects files and works on standard hosting. X-Accel-Redirect/X-Sendfile adds better performance for large files but needs host support, so confirm that first. Avoid Redirect only for paid files, as it leaves them open to outside access.

Why can a customer not download after paying?

Check the order status. Orders containing a physical item stay at Processing, and downloads wait for Completed unless you tick Grant access to downloadable products after payment.

Do download limits apply to guest buyers?

Limits and expiry are set on the product, but the Downloads require login option does not apply to guest purchases. Guest buyers rely on their download link, so test that path separately if you allow guest checkout.

Accessibility settings

Adjust how this site looks and moves. Your choices are saved in this browser.