How do I relocate my download folder

In Zen Cart v1.3.x and newer, it is possible to relocate the "download" folder outside your webserver's "webroot" (the public_html or httpdocs or htdocs etc) folder so that thieves cannot directly link to real files on your server and download without paying or being authenticated.

To do this, you must:

  1. Choose a download method of either "Download by Streaming" or "Download by Redirect" fromAdmin->Configuration->Attribute Settings.
    If you're using a Linux server, either option is suitable.
    If you're using a Windows server running IIS, you cannot use redirects. Instead, you will need to useDownload by Streaming in order to handle secured downloads.


  2. Use your FTP program to move your "download" folder outside your webroot. Perhaps drag-and-drop it to a level "above" your public_html folder. The method you choose for moving or creating this folder will depend on your hosting account and the tools available to you for moving folders.

  3. Usually the "download" folder is located inside your store area, for example:
    - /home/my_user_name/public_html/mystore/download

    You want to move it "above" your public_html folder, something like this:
    - /home/my_user_name/download

  4. Edit your two configure.php files to show the new path to your download folder:
    - /includes/configure.php
    - /your_admin_folder_name/includes/configure.php
You'll need to edit the line that says this:

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

to look something like this:

define('DIR_FS_DOWNLOAD', '/home/my_user_name/download/');

Specifically, you need to indicate the exact complete path for the webserver's filesystem that points to your download folder.  You could use your DIR_FS_CATALOG entry in your configure.php file as a reference, and make appropriate adjustments.  Your FTP program and/or your webserver's hosting control panel should be able to help you understand the complete path.
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...