Caching with Leaky Paywall (i.e WP Engine)
Leaky Paywall can/will work with Caching plugins (like WP Super Cache), but it all depends on how it’s setup. Any caching plugin you use will have a lot of different setup options, and the sort of plugins you’re using (WooCommerce, iThemes Exchange, Leaky Paywall, etc) will often times determine what kinds of caching you should be using. Any sort of caching that simply caches the HTML output of a page is pretty basic and often has problems. The best caching to use with any sort of membership management sites like Leaky Paywall is backend object caching.
1. Enable “Alternative Subscription Handling”
In Leaky Paywall > Settings > Subscriptions click the “Alternative Subscription Handling” checkbox to enable it.
2. Set the post and page container selectors
By default Leaky Paywall uses the CSS selector "article .entry-content" to determine where your content lives on the screen. If your theme uses a different CSS selector, enter it here. You can enter a different selector for posts and pages in case your theme uses different selectors for each type of content.
You can use your browser's inspector to find the selector that contains your post content. In the screenshot below the correct value to use for the post container selector is "article .entry-content".
In the example below, the correct value to use for the post container selector is ".td-post-content".
3. Make sure your theme is using the body_class() function
WordPress themes should use the body_class() function to add default WordPress classes to the <body> tag of your site. This is standard on almost every WordPress theme and is required for Leaky Paywall to work. It will look like this in your theme:
<body <?php body_class(); ?>>
For more information, please see https://developer.wordpress.org/reference/functions/body_class/
4. If it's still not working with WP Engine, disable the cookie from caching on live site
Ask WP Engine support to “disable this cookie from caching on live site”:
For single site: issuem_lp For multisite: issuem_lp_<site id>
You may also need to whitelist certain URLs, for instance, if you’re using the IssueM plugin, you could white list this URL:
We use Nginx, PHP-FPM, and Redis caching on our sites and have never had any trouble with any e-commerce or membership solution.