With downloadable products in WooCommerce, you can sell items such as e-books, audiobooks, games, software, or event tickets in PDF format. The possibilities are truly vast, and the configuration is simple. Additionally, all files are protected against unauthorized downloads (without purchasing the product).
File Download Method
To configure the download method for virtual products, go to WooCommerce → Settings → Products → Downloadable Products.
The first option you need to set is the File Download Method. Here, you have several choices:
Force Download – if you want clicking the link to trigger the file download. It’s worth noting that the link is additionally protected, and knowing the URL alone is not enough to download the file; permissions are required.
X-Accel-Redirect/X-Sendfile – a solution similar to force download but better supports large files. Check if your server supports this standard.
Redirect Only (unsafe) – if you want the user to receive only a link to the file. Unfortunately, this option does not protect the files, so think twice before applying it.
You can also configure access restrictions:
Download Requires Login – if you allow registration on your store, you can enable login requirements to download files.
Grant access to downloadable products after payment – this option allows users to download the file at the “processing” status stage.
You can also specify the file name format:
File Name – check the checkbox if you want the name to contain a unique string of characters.
Adding Downloadable
Configure the product settings. To do this, go to Products → Add Product in the menu.
Configuring a downloadable product is similar to any other type of WooCommerce product. See how to configure the basic product options →
Go to the Product Data section. From the dropdown menu, select the Simple Product option.
At the top, be sure to check the Downloadable option to see additional configuration possibilities.
Choose the file and optionally add a visible name for users. You can add multiple files for download to one product; click the Add File button to add another file.
Download Limit – set a limit or leave the field blank to allow an unlimited number of downloads.
Download Expiry – enter the number of days from the purchase date for the link to be active, or leave the field blank for the link never to expire.
Variant Products
For products with variants, you can also decide whether they will be available for download. Additionally, selected variants can be downloadable products while others are not. This allows, for example, selling physical books and e-books as part of one product.
Select a product with variants, and then configure each variant similarly to the description above.
User Purchase Process
The purchase process does not differ significantly from the standard one. However, after payment, a download link appears in the email:
The product can also be downloaded on the My Account page.