latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Can I optimize the speed of s2member?

Home Forums Community Forum Can I optimize the speed of s2member?


This topic contains 19 replies, has 6 voices. Last updated by  Duncan Rawlinson 4 years, 9 months ago.

Topic Author Topic
Posted: Friday Mar 30th, 2012 at 5:28 pm #9607

Hey all,

I tried searching the forum but couldn’t find what I needed. Apologies if I don’t have the right info here.

Just wondering how I can optimize the speed s2member which I have running on my photography school here:

I have s2member pro version 120309 running on wordpress 3.3.1 running on my server at rackspace cloud sites. I also have the WP Super Cache plugin running and a couple other plugins.

For some reason it appears as though some of the s2member plugin php files are making the site load very slowly. I know these website speed test things aren’t super accurate but take a look at this:

My friend who is way more technical than me looked into this and he noticed the following:

These two files are being loaded on seemingly every page on the site:

– s2member-o.php?ws_plugin__s2member_js_w_globals=1
– s2member-o.php?ws_plugin__s2member_css=1

Both take a significant amount of time to load and are significantly
slowing the page loads of the site. It was measured between 700-1500ms
of drag (including request, wait, and download).

Ideally, as I see it:

– global CSS and JS should be centralized and loaded as static files so you could move them to your CDN. They could then be loaded on every page w/ little overhead.
– custom CSS and JS loaded through s2member-o.php would only be loaded on the pages that needed them (signup form, edit profile form?) so it doesnt have to send 3 php requests to the server for every single page that loads on the site
– even better, though would require a completely different code path, would be removing all variables from the JS/CSS (don’t think there are any in the CSS) and injecting that information into the HTML so that all JS/CSS can be shared whether logged out or in. Maybe even as raw json injected below the form that’s then loaded by the shared JS.

What I looked into:

– how these files are being loaded and if they could be moved to only load when the form is loaded. unfortunately the way the wordpress pages load, I couldn’t make this work correctly
– some of the CSS/JS in these files may be used throughout the site. I don’t know this for sure, but there’s some stuff to do with badges that might be dispersed throughout the site? This would be something that the plugin creator would know more about.

I’m just wondering what I can do to speed things up?

Thanks for any help!

List Of Topic Replies

Viewing 19 replies - 1 through 19 (of 19 total)
Author Replies
Author Replies
Posted: Friday Mar 30th, 2012 at 6:09 pm #9610
Username: Eduan

Hello Duncan, thanks for your inquiry.

Have you tried using Quick Cache in order to speed up your website?

Quick Cache was coded and created by Jason Caldwell (lead developer), so it’s fully compatible with s2Member and its optimized to work with s2Member.

Hope this helps. :)

Posted: Friday Mar 30th, 2012 at 6:12 pm #9611

Yes I did try that but it didn’t seem to make any noticeable difference.

Any other ideas?

Thank you!

Posted: Friday Mar 30th, 2012 at 7:49 pm #9613
Username: Eduan

Thanks for the follow-up.

I believe this is because the page is being cached. The difference will be noticed when you try to access that page again, as long as there are no changes the loading time should be much faster.

If it doesn’t work for you, I’m not sure what I can recommend :/ …

Posted: Saturday Mar 31st, 2012 at 2:36 pm #9675

This seems to happen even with the caching plugin disabled.

Posted: Saturday Mar 31st, 2012 at 3:40 pm #9678
Username: Eduan

Thanks for the follow-up.

This may be because there are two types of caches; server-side cache and client-side cache.

The client-side cache is what your browser stores in your computer in order to not have to download the page again.

And the server-side cache is a cache the server generates when it loads a page, so the server-side cache is an already generated page. When the server loads the page for the first time, it has to read all the code, generate it, output it, and then your browser downloads it from the internet. The server-side cache is a page, already generated and ready to download that your server creates.

You probably don’t notice a difference because, you get the page with your browser, create a cache in your client-side and server-side, when you enter that page again, the difference isn’t much, because the cache is in your computer, if you clear your client-side cache, and you try to load your page again, that’s where server-side cache kicks in.

Now, if your internet and server are fast, the difference will probably be minimal.

I recommend you leave Quick Cache installed, and see over a span of time, if you or your clients notice a difference.

Hope this helps and clears some things up. :)

Posted: Saturday Mar 31st, 2012 at 3:46 pm #9679

I’m not confused about caching or how caching works. I’m trying to speed up the site and need help doing so.

I understand the difference in types of caching and I have tested many different ways and I’m pretty sure it’s the plugin causing the slow down. I’ve tried clearing caches on both client and server and see no results…. The thing still runs very slowly.

I don’t understand why the plugin needs to load those files on every page load.

What do you suggest I do to improve the speed of this plugin?

Posted: Monday Apr 2nd, 2012 at 3:21 pm #9792
Raam Dev
Username: Raam
Staff Member

Hi Duncan,

You may be interested in reading these two threads related to s2Member optimization:

It’s also worth noting that you can use a plugin such as Plugin Organizer to disable any unneeded plugins on specific pages throughout your site.

Posted: Tuesday Apr 3rd, 2012 at 2:34 pm #9894

I’ll try the plugin organizer and see if that helps.

I don’t really want to remove the css/js.

Thanks Raam!

Posted: Wednesday Apr 4th, 2012 at 2:24 pm #10047
Raam Dev
Username: Raam
Staff Member

Glad to help, Duncan! :)

Posted: Monday Apr 9th, 2012 at 12:44 pm #10360

Just to follow up with this. I tried everything suggested here and I was not able to improve the speed of the site.

I think I might have to look at other plugins/hosting.


Posted: Monday Apr 9th, 2012 at 1:13 pm #10363
Username: ryannagy

My issue with my slow-loading S2member site was the landing page. I was getting tons of traffic through affiliate emails and was fairly certain that the slow load was killing my conversion rate. Though I was not able to solve the problem, I did move to having an html landing page instead of using a static wordpress page. That made a huge difference. The landing page is small and light and loads very quickly.

Just my two cents for what it’s worth.

– Ryan

Posted: Monday Apr 9th, 2012 at 1:20 pm #10364

Thanks @ryan

My problem is that the plugin slows down every page on the site when 95 percent of my content is not protected…

Just wish I was a little more technical so I could figure this out.

Posted: Monday Apr 9th, 2012 at 5:30 pm #10385
Raam Dev
Username: Raam
Staff Member


I’m personally using s2Member on two sites, protecting hundreds of pages/posts, and I have not noticed any decrease in performance.

Have you tried using the Plugin Organizer plugin to disable s2Member on all pages except those where it’s required?

Posted: Monday Apr 9th, 2012 at 5:38 pm #10387

Hey Raam,

I tried the plugin organizer plugin but it appeared as though I had to manually enter hundreds of page urls to make it work. Maybe I misunderstood how the plugin organizer works but I don’t want to have to maintain a giant list of urls to protect and not protect. Also this plugin slowed the site even further.

Thanks for your help!

Posted: Tuesday Apr 10th, 2012 at 2:08 am #10428

Duncan, I just tried the Plugin Organizer and think I found how you do that.

Go to the Global Plugins page and disable the plugins globally. [hilite path]WP Admin -> Plugin Organizer -> Global Plugins[/hilite]

Then go to edit the page you want to use one of those in and enable it there from the panel the organizer adds there (if you can’t see it, check the Screen Options tab at the top).

I hope that helps. :)

Posted: Tuesday Apr 10th, 2012 at 2:16 pm #10483


When I try that the s2member php files are still being loaded on every single page.

Posted: Tuesday Apr 10th, 2012 at 3:06 pm #10494

I see. I wonder if it has to be deactivated from the plugins manager as well, but I doubt then that s2Member would work normally at all. Sorry I couldn’t help more with that, I’m not very experienced with Plugin Organizer.

Posted: Tuesday Apr 10th, 2012 at 7:56 pm #10527

I don’t really want to remove the css/js.


You don’t need to remove the css all together just copy what you need and add it to your main stylesheet then stop s2member loading its version that will save you 1 http request.

As for making your site faster I had a quick look and would suggest combining the 5 stylesheets you have into 1 saving 4 http requests and doing the same with all the javascript.
Adding Expires headers to all your images so browsers don’t keep downloading will save lots of time.
Minifying, combining and gziping css and javascript files will save you more than enough time to compensate s2members loading times based on the results you linked too.

80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages

Hope that helps

Posted: Wednesday Apr 11th, 2012 at 12:55 pm #10562


Thanks for your help!

I actually had much of what you suggested implemented up until recently and the only thing that was still slowing the site down was the s2 plugin.

I recently since removed all the other optimizations I did to make sure it is in fact the s2 plugin slowing the site… In other words I removed all the minify’d stuff, etc etc to ensure what was causing the slowdown. Turned out it was the plugin. The server itself isn’t helping either.

Just haven’t put the pieces back together yet….

Viewing 19 replies - 1 through 19 (of 19 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.