This guide was made to show you how to protect your downloadable content using Memberium and Amazon S3. The benefit of this setup includes expiring links so members can’t share download links with non-members, and you may see a possible performance increase by offloading file storage to S3 rather than your WordPress site.
What You’ll Need
- Amazon S3 Account
- Memberium Plugin
Getting Your S3 Access Keys
The video below will show you how to generate and access your Amazon S3 Access and Secret keys.
Setting File Permissions
Below you’ll see a demonstration of how to make sure your S3 files aren’t public. The key is to remove all permissions for the “Everyone” group. You’ll also want note down the path to the file. In my example, the bucket is ‘lesson523’ and the file name is ‘lesson1.pdf’
In WordPress, navigate to Memberium>>Remote Files and fill in the details we just acquired. The Profile name will be used in Memberium shortcodes to reference back to this S3 account. The Default Host is usually “s3.amazonaws.com” and the Expiration can be set to 3. The other details will be specific to your S3 account.
Setting up Shortcodes:
We have various shortcodes that hook into the S3 integration, but for this guide, we’re focusing on downloads so we’ll use the [memb_s3_link] shortcode.
Example linking to the file shown in the second step:
<a [memb_s3_link htmlattr=href profile=”test” object=”lesson1.pdf”] > Download Lesson 1 </a>
You can add other HTML attributes to the text or even use an image that links to the file. Once the user clicks on that link, the expiration countdown will start. If you chose 3, as was recommended above, then after 3 seconds the link will stop working so if it was shared it would have expired before the recipient would be able to access it.
If you have any questions or would like some help at any time, our support team is standing by.
Pro TipIf you submit a ticket for assistance, please be sure to include all the requested information so we can get started on your ticket right away.
The number one delay in ticket service is incomplete or wrong information.