Test Course

lipsum

How to cache your membership site

You know what caching is and its benefits, create the page once and serve it many times. The problem with this is that it'll always be the same, and that is not desirable for every page.

Many pages may have dynamic content that'll change for some reason. One of those could be that you show one thing to someone that paid to view more content in a page, while the regular visitor only gets a preview.

And the username would change for each user, of course, so the "Howdy..." message would not be right if the guy gets the page that some other user got cached.

Some have tried partially caching a page, and there are different approaches, but it gets complicated and is generally not recommended.

A better approach would be to cache separate copies of the page, unique for each logged in user. A member would not benefit from the cache someone else caused, but he'd still benefit from it when visiting the same page again.

So the caching plugin would need to know how to cache pages for logged in users in a way that each gets what he's supposed to, and not make a mess.

For my membership sites I use ZenCache, which in the Pro version has the ability to do just that and works great.

You just enable the setting and it'll the do rest for you, very simple to use, and you'll finally be able to benefit from caching for your membership.

ZenCache Logged-in Users panel

You can see ZenCache's complete features list here: http://s2member.net/go/zencache

And here's the free version, with a preview of the Pro features: https://wordpress.org/plugins/zencache/

I hope that helps! 🙂

InfusionSoft integration

Here’s a video that Sterling Chase, from our s2Member Pro community, made to show how he integrated s2Member with InfusionSoft using Parsey’s service:

You may also be interested in this tutorial by Randy King about integrating with InfusionSoft using s2Member Pro’s Remote Operations API: http://www.s2member.com/forums/topic/infusionsoft-integration-3/#post-38950

Both integrations are limited, but they may be enough for what you want, just as they were for them. I hope this helps you, and if you find how to improve it, I look forward to hearing from you with your tips! 🙂

Quick Start video

I’ve been asked a few times to explain what to do to get started quick, and I finally got around to making a short video to show you.

We’ve had a lot of new users every week, and more coming in all the time, so this is for all of you getting your head around this plugin.

And for all those who’ve already used it a bit, it may still be good to give this a watch, it only takes a few minutes and -who knows- you may get something out of it too. 🙂

Updating an old installation

Maybe you haven’t updated s2Member in many months, or years even, and many versions were released since the one you're using. That’d a big jump in versions and there could be trouble when you update to the latest.

Here are some recommended steps you may want to consider:

– Make sure you have s2Member’s Deactivation Safeguards enabled. This wasn’t always enabled by default, and your installation may be old enough that it’s disabled. Dashboard -› s2Member -› General Options -› Deactivation Safeguards

– Create a backup of everything in your site (e.g. files, database).

– Check that your server is ready for the latest s2Member. The latest release may require some things that the old one didn’t. Use our server scanner find any issues and follow the suggestions given to solve them. See: Knowledge Base » s2Member Server Scanner

– Clone the live site to have a development copy you can work on and break without affecting your customers during your tests. See:
http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_to_a_New_Server
http://codex.wordpress.org/Running_a_Development_Copy_of_WordPress

– Try the update to the latest release in the development copy you just created. See:
s2Member Framework Update
s2Member Pro Update

– If you have trouble updating straight to the latest release, then try doing the updates little by little. Keep notes of the steps you take so you can reproduce them later in the live site after you succeed. Here you can find previous releases:
http://wordpress.org/plugins/s2member/developers/
http://s2member.com/release-archive/

– As part of your tests, remember to review the site to make sure everything is working correctly. There may be conflicts with other plugins or your theme, that weren’t there before. See: Troubleshooting Tips

– Once you succeed updating the dev copy to the latest version and have everything working fine, make a new backup of the live site and take the same successful steps there to update s2Member to the latest release.

If you don’t know how to do one or more of these steps, you may want to google it, or get someone to do it for you. You can find freelancers in sites like jobs.wordpress.net, freelancer.com, upwork.com or elance.com.

Blank page, 414 error, request URI too long

If you’re getting a blank page when redirected to the Membership Options Page, when returning from the payment gateway, or some other long URL, you may be getting a 414 error: Request URI too long. http://www.checkupdown.com/status/E414.html

What you need to do is contact your web host so they raise the limit for your website/account.

s2Member has a few URLs that can be quite long, and you need these to work or you’ll have trouble with some checkouts or redirections.

Adding a payment gateway

s2Member integrates with PayPal Standard, and the s2Member Pro add-on adds a few other payment gateways/services. See: http://s2member.com/features/

If you see that the payment gateway you want is supported by s2Member Pro and you don’t have it yet, go get it here: http://s2member.com/prices/

If you want s2Member to work with a payment gateway not listed there, find out if the payment gateway you want has an integration with s2Member, maybe they already did.

If they haven’t, you could ask them for it, create it yourself, or get a developer to do it for you. You can find freelancers in sites like jobs.wordpress.net, freelancer.com, elance.com or upwork.com.

These may be useful to create the integration:
WP Admin -› s2Member -› PayPal Options -› PayPal IPN Integration -> Proxy Key
WP Admin -› s2Member -› API / Scripting -› Remote Operations API
WP Admin -› s2Member -› API / Notifications

The Remote Operations API currently makes possible from a script outside of WordPress, to create a new user, authenticate an existing user, retrieve data from his account, update his account or delete it.

Or look at how one of the s2Member Pro payment gateways works and use it as a starting point for yours.

Keep in mind that if you don’t do a full integration, following the way the other ones have been done, you may have some limitations that you need to overcome or at least be aware of.

The one I know will happen if you use the PayPal IPN with proxy key, is that it’ll only work for new signups, not upgrades of existing users, because the user ID is not being referenced.

So it’s best to study an existing integration and emulate it to take advantage of all the features.

Admin pages not looking or working right

The s2Member admin pages use CSS and JavaScript to look and work properly. If there’s something wrong with them, it’s very likely that something is preventing the styles or scripts from working or even loading.

There are three main things that we’ve seen cause this:

Theme

The theme you’re using may be causing trouble and you can test this simply changing to the default theme for a moment and reloading the admin page you’re having trouble with.

Plugin

Some plugins have also been known to conflict in a way that may cause the s2Member admin pages to not work correctly.

To test these, just deactivate them all and reload the page, or deactivate them one by one and check after each if the problem is gone.

Index file

If the default WordPress index file has been changed to something else, like an index.html one for example, this would also cause the s2Member styles and JavaScript to not load.

Try changing back to the default index.php file and reload the admin page.

If the above don’t solve the problem, there are a couple more things you could try. Please see this article: Troubleshooting Tips

Unable to Verify $_POST Vars Error

There are two main things to try when fixing this error:

Server Scanner

This script will help spot some known server issues that would cause you this error. Knowledge Base » s2Member Server Scanner

Follow the instructions in that article to spot these issues, and follow the advice given to solve each until you get an all-green report.

s2Member Server Scanner all-green screenshot

PayPal PDT

That setting would cause this error if it’s missing or incorrect. Please verify that your PDT configuration is correct. Dashboard -› s2Member -› PayPal Options -› PayPal PDT Integration

After fixing each one, do a new test purchase to see if the error is gone.

If you continue having this issue, try these other tips to help solve the issue: Knowledge Base » Common Troubleshooting Tips

Levels without incremental access

We're sometimes asked how it'd be possible to use levels but not give incremental access to the content.

Normally, a user would get access to content restricted at his level or below. So if the user is at Level 2, he gets access to content for Level 2, 1 and 0.

You may want to sell Level 2 but not have that user accessing Level 1 content. Custom capabilities would be better than levels in these situations. http://www.s2member.com/videos/A2C07377CF60025E/

That said, there are two ways in which you can protect content with levels and not have the users access content for levels below theirs.

Conditional

In the page or post, use conditionals that check the user's level to show or hide the content. WP Admin -> 2Member -> Scripting -> Conditionals

Here are some examples from that documentation:

[s2If current_user_is(s2member_level2)]
Some premium content for Level 2 Members.
[/s2If]
[s2If current_user_is(s2member_level1)]
Some premium content for Level 1 Members.
[/s2If]
[s2If current_user_is(s2member_level0)]
Some content for Free Subscribers.
[/s2If]

Capabilities

You can edit the s2Member Level roles to remove the capabilities that give access to other levels.

You'd do that using another tool, like the User Role Editor. http://wordpress.org/extend/plugins/user-role-editor/

If you do this, you'll need to lock the roles so they aren't reset when updating s2Member. http://www.s2member.com/kb/locking-s2member-roles-caps/