Digital/Downloadable Product Guide

While the default downloadable product settings work for most merchants, some stores need a different configuration. This page guides you through the downloadable product settings in WooCommerce, including file download methods, upload protection, storage options, and how customers receive and access their downloads.

General settings

↑ Back to top

Configure how WooCommerce delivers downloadable files to your customers. To access these settings, follow the steps below:

  1. Go to WooCommerce > Settings > Products > Downloadable products.
  2. Select a File download method from the dropdown. Each method handles file delivery differently:
    • Force downloads — Files are delivered using PHP, which prevents direct linking. If your files are large or your server is underpowered, you may experience timeouts during download. In that case, upgrade your server or use one of the redirect methods instead. This method requires the allow_url_fopen PHP function to be set to On. To check this setting on your site, you can create a phpinfo() page as described in the PHP error logs guide, install one of the phpinfo plugins from WordPress.org, or contact your host.
    • X-Accel-Redirect/X-Sendfile — The server (nginx or Apache) handles file delivery directly to the customer. This method requires the X-Accel-Redirect or X-Sendfile module to be installed and enabled on your server. Confirm with your web host that one of these modules is available before selecting this method. It offers strong performance and security because files are protected by an .htaccess file and served directly by the server.
    • Redirect only (insecure) — Customers access downloads by being redirected directly to the file URL. Anyone with the URL can access the file, even if they are not logged in. This means customers who purchase the product can share the link with others who have not.

Note: If you select either Force downloads or X-Accel-Redirect/X-Sendfile, you can enable the Allow using redirect mode (insecure) as a last resort setting. This allows the redirect method to be used if a file cannot be delivered using your selected method. This carries the same risks as Redirect only (insecure) but is helpful when you host assets across different platforms that may not work with your preferred method.

  1. Select your access restriction options:
    • Enable Downloads require login if you want customers to be logged in before they can download files. Guest checkout must be disabled for this option to work.
    • Enable Grant access to downloadable products after payment if you want customers to access their files when orders are in a Processing status, instead of waiting until the order is marked Complete. This is helpful if you sell downloadable products alongside physical products, so customers do not have to wait for the physical product to arrive before accessing their digital content.
  2. Determine whether to keep Append a unique string to filename for security enabled. This setting is enabled by default and is recommended to enhance file security. It is not required if your upload directory is properly secured through other means. Activating or deactivating this setting does not affect previously uploaded files or links; it only applies to files uploaded after the change.
  3. Click Save changes.
WooCommerce downloadable products settings screen showing file download method, access restrictions, and filename security options

Additional settings are available under WooCommerce > Settings > Products > Approved download directories (the tab next to “Downloadable products” at the top of the page). These settings are particularly useful for sites where shop managers or other users can edit products. See the approved download directories documentation for details.

Protecting your uploads directory

↑ Back to top

By default, WooCommerce adds an .htaccess file to protect your wp-content/uploads/woocommerce_uploads directory. However, this does not guarantee protection in all server configurations. The sections below cover additional measures you can take.

NGINX server configuration

↑ Back to top

If you use an NGINX server with the X-Accel-Redirect/X-Sendfile or Force downloads method, you need to modify your server configuration for proper file protection. Refer to the WooCommerce developer documentation on NGINX uploads protection for instructions.

Unique string appended to filenames

↑ Back to top

As described in the general settings section above, WooCommerce appends a unique string to uploaded filenames by default. This makes it harder for unauthorized visitors to guess download URLs.

The append a unique string to filename setting enabled in WooCommerce downloadable product settings

Storing files and downloads

↑ Back to top

Where you store your downloadable product files depends on your preference and security needs. WooCommerce requires only a valid external URL to deliver a file, so you have several storage options. The sections below answer common questions about file storage.

Cloud storage

↑ Back to top

You can use cloud storage to host your downloadable files. WooCommerce only needs an external URL that points to the file. However, some cloud storage providers, such as Google Drive, only work when you select Redirect only (insecure) as the file download method. See the general settings section for an explanation of each method.

Securing files uploaded through the media library

↑ Back to top

When you upload a file through the WordPress media library instead of through WooCommerce, anyone with the direct URL can access the file. The WordPress media library is public because it stores all images and files attached to posts and pages.

To prevent unauthorized access, upload files from the Edit product page in WooCommerce rather than selecting them from the media library. WooCommerce uploads those files to the woocommerce_uploads folder, which is not publicly accessible.

Supported file extensions

↑ Back to top

WooCommerce supports the same file extensions that WordPress allows. You can view the full list in the WordPress Codex: Uploading Files documentation.

Maximum file size

↑ Back to top

WooCommerce does not impose a maximum file size limit. However, your server likely has its own limit. Contact your hosting provider if you need the limit increased.

Customer experience when ordering a downloadable product

↑ Back to top

When a customer orders a downloadable product, they receive an email containing a download link for the purchased file. If the customer has an account on your site, the download link is also available under My Account > Downloads. Your downloadable product settings affect when customers gain access to their downloads:

  • If you enable Grant access to downloadable products after payment, customers can download the product from the order received page, the order email, or the My Account > Downloads page (if they have an account).
  • If you do not enable Grant access to downloadable products after payment, customers gain access only when the order status is set to Complete. For products marked as both “virtual” and “downloadable,” WooCommerce sets this status automatically. If the product is only marked as “downloadable,” you need to manually mark the order as Complete for customers to access the downloads.

Note about PayPal Standard (deprecated): If you use PayPal Standard, there is a delay when using IPN to track payments, which may cause download links to not appear on the order received page. To avoid this, switch to PayPal Payments. If you choose to continue using PayPal Standard, follow the steps below to enable Payment Data Transfer (PDT).

To configure Payment Data Transfer (PDT) for PayPal Standard:

  1. Enable Payment Data Transfer (PDT) by going to the PayPal gateway settings in WooCommerce and entering the PayPal Identity Token.
  2. Enable PDT in your PayPal account under Profile > Profile and Settings > My Selling Tools > Website Preferences.
  3. Enable auto-return and enter the return URL as https://yoursite.com/checkout/order-received/ (replace yoursite.com with your site’s address), then enable PDT.
  4. Copy the identity token to your WooCommerce settings under WooCommerce > Settings > Checkout > PayPal. This allows payments to be verified without relying on PayPal IPN.

Order confirmation email

↑ Back to top

After the order is processed and payment is confirmed, the customer receives an order confirmation email containing a clickable download link.

Example order confirmation email showing a download link for a downloadable product

If your Completed order emails do not include download links, there may be a database issue. See the guide on completed order emails missing download links for troubleshooting steps.

Manage orders with downloadable line items

↑ Back to top

You can view and edit a customer’s access to a purchased downloadable product from the order screen. Follow the steps below to manage download permissions:

  1. Go to WooCommerce > Orders and select the order you want to view or edit.
  2. Scroll down to the Downloadable product permissions meta box. This section displays the available downloads and how many times the customer has accessed each file.
  3. From here, you can revoke access, grant access to new downloads, or close the order.
Downloadable product permissions meta box on the WooCommerce order edit screen

Edit downloadable files after customers have purchased

↑ Back to top

If you change a downloadable product’s files after customers have already purchased it, the behavior depends on whether you edit an existing file or add a new one:

  • Editing an existing download file row (changing the name, file URL, or both) updates the download links on past purchases but leaves the expiry date and remaining download count intact.
  • Adding a new download does not affect past orders. Only new purchasers gain permission to download it.

If you sell products that grant lifetime access to all downloads added to a product, a subscription or membership extension may be more appropriate. You can also combine files into a single archive (zip). To restore the previous behavior where new files are automatically granted to past purchasers, a plugin is available on GitHub.

Download logs and reports

↑ Back to top

WooCommerce tracks and logs downloads of digital products with unique IDs. You can view download activity in the Downloads report in WooCommerce Analytics.

Questions and support

↑ Back to top

Do you still have questions and need assistance? 

This documentation is about the free, core WooCommerce plugin, for which support is provided in our community forums on WordPress.org. By searching this forum, you’ll often find that your question has been asked and answered before.

If you haven’t created a WordPress.org account to use the forums, here’s how.

  • If you’re looking to extend the core functionality shown here, we recommend reviewing available extensions in the WooCommerce Marketplace.
  • Need ongoing advanced support or a customization built for WooCommerce? Hire a Woo Agency Partner.
  • Are you a developer building your own WooCommerce integration or extension? Check our Developer Resources.

If you weren’t able to find the information you need, please use the feedback thumbs below to let us know.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.