The Download Protect extension allows you to load files such as images, documents, etc to a protected directory that requires the user to be logged in to access.
This extension is available with the WP-Members Pro Bundle, WP-Members Lifetime Support, or is also available individually.
Settings
When you install the extension, it will add a “Downloads” tab to the WP-Members admin area. This tab is for managing the extension’s settings.
User IDs to exclude
This setting allows you to identify user IDs that you want to exclude from download stats tracking. Values should be the numeric ID of the user and all IDs should be separated by commas (do NOT use commas in IDs that are in the thousans; i.e. 14567 should not have a comma in it).
Set Error Page Location
This is a page you need to create to handle any errors, such as a non-logged in user attempting to download, or if something goes wrong with the download.
Download Files
The plugin adds a menu item for uploading files. This is found under Media > Download Protect
This screen will give you a table of any media files you have uploaded to the protected download directory. This table includes link information (download links are by key and not by file name) for each file, and also allows you to edit any files should an uploaded file need to be updated.
Download Tracking
Under Dashboard > Download Tracking is a screen that allows you to track what files have been downloaded by what users. The main screen is a list of all downloads and shows the date, the user, the file information (title and file name), the page they click on, and the user’s IP address.
This screen allows you to filter by user and by file so you can view more specific information. You can filter by:
- User to show all files downloaded by a selected user
- File to show all users who have downloaded a selected file
- User & File to show how many times a selected user downloaded a selected file
Additionally, a truncated version of this table is included on the admin user profile page for each user showing the last 5 downloads (this value can be filtered to show more or less) with a link back to the main tracking page to show all downloads for that user.
Installation
Download the zip package from the downloads page. You can install this via the WP admin by going to Plugins > Add New and selecting Upload.
Once installed, the first thing you want to do is create an error page. This page is where a user will be directed in the event of an error when downloading (such as if a user is not logged in). On this page, place the following shortcode:
[wpmem_dp_error]
Once this page is created, go to Settings > WP-Members and option the Downloads tab. Use the selector for “Set Error Page Location” to select the page you create for download errors.
If you have any users you want to exclude from download tracking, enter their IDs separated by commas into “User IDs to exclude”.
Save your settings.
Now you are ready to upload some files. Go to Media > Download Protect and click “Add New”. This will give you a dialog to upload a file. Give the file a title (whatever identifies it to you) and click “Choose File” to open a file selector. Once the file is selected, click “Upload File”.
You can also edit or delete files from this list. To edit or delete a file, mouse over the file name and click the appropriate link from the hover menu.
Editing a file gives you the option to upload a new version of the file and/or change the file’s title. Note that none of the file’s information changes – specifically, the file’s identifying key. So any changes will be tracked in the statistics as the same as the previous file. If your new version needs to be tracked separately, it should be loaded as a new file.
Note that the download link is dependent upon the file’s key. So if you edit a file, you do not need to change the key. If you delete and/or replace, you’ll need to either edit your download links or remove them.
Once files have been loaded you can create links for your users to download. The list of files offers two options. First it gives you the file’s direct link. This can be used in the WP post editor when creating a link. Alternatively, it gives you a shortcode that will generate a download link using the file information. Either can be used.
Once files are loaded and some have been downloaded, you can view download statistics on the Dashboard > Download Tracking screen.
This extension is available with the WP-Members Pro Bundle, WP-Members Lifetime Support, or is also available individually.