Hi @ricky – It seems to be some kind of server limitation as the problem is causing only with PDF files with large size.
If you go to WooCommerce > Settings > Downloadable Products
, you have three choices under File Download Method:
- Redirect only – When users download a file, their link redirects to the file.
- Force download – File downloads are forced, using PHP.
- X-Accel-Redirect/X-Sendfile – Downloads are handled by the server (nginx/apache). This method requires the X-Accel-Redirect/X-Sendfile module be installed and enabled on the server. Confirm with your web host that one of these modules is installed before using this method for your store.
To ensure files are protected from direct linking, Force Download can be used. Files will be served by PHP. However, if your files are large, or the server is underpowered, you may experience timeouts during download. In this case, you need to either look at your server or use the redirect method.
If your server supports it, use X-Accel-Redirect/X-Sendfile; it’s the most reliable method because the file is served directly to the customer, and gives you the best performance. Files are also protected by an .htaccess file, making it secure.
-
This reply was modified 8 years ago by Prasad Nevase. Reason: improved formatting