Login
Get Started

Easy Digital Downloads Documentation

Documentation, Reference Materials, and Tutorials for Easy Digital Downloads 

EDD_READ_FILE_MODE

When downloads are delivered to the user, the files are read using the PHP readfile() function, but because some hosts do not allow files to be ready via URL, this will occasionally fail. The EDD_READ_FILE_MODE constant is available for these scenarios.

Note, this is only valid for plugin versions before 1.1.5

If a host does not allow readfile() to access files via URL, then define this in functions.php or any custom plugin:

define('EDD_READ_FILE_MODE', 'header');

When this constant is defined to “header”, Easy Digital Downloads will use header(“location:” . $file_url) for directing the user to download the file. This is not as secure so should only be used when readfile() does not work.

Was this article helpful?

Start selling today!

Join over 50,000 smart store owners, and start using the easiest way to sell digital products with WordPress.

Copyright © 2025 Sandhills Development, LLC