When it comes to WordPress sites, not all of them can be treated the same in terms of what works best for performance. A simple five-page WordPress site behaves completely different than say a large WooCommerce site (which can be very demanding). WordPress membership and community sites are another type that falls into what we sometimes call this “tricky” category. If not set up or configured correctly, you’ll soon find yourself in a nightmare of 500 errors, downtime, and slow page loads. But that doesn’t mean you don’t have options, you just need to follow some best practices.
Today we’ll explore some of the do’s and don’ts for WordPress membership sites and how to best optimize them to ensure optimal performance, scalability, and longevity. 🚀
- Examples of Membership Sites
- Why WordPress Membership Sites are Different
- Do’s for WordPress Membership Sites
- Don’ts for WordPress Membership Sites
Examples of Membership Sites
Here are just a few examples of some common WordPress membership and community sites:
- A site built around a Learning Management System (LearnDash, Lifter LMS) which sells digital courses to its members. These are becoming really popular lately and there are some great LMS plugins out there!
- A forum based (bbPress or BuddyPress) WordPress site primarily used by members to discuss different topics.
- A membership site built on one of the many popular all-in-one third-party membership plugins (MemberPress or Ultimate Membership Pro).
- A social networking focused community site (PeepSo).
- Some might also include eCommerce solutions such as WooCommerce and Easy Digital Downloads as membership sites as many of these have user profiles and community features.
Why WordPress Membership Sites are Different
Before we jump into the do’s and don’ts, let’s dive into a few reasons why WordPress membership sites are different than your standard blog or small business website.
1. Uncacheable Content
First of all, membership sites contain a lot of uncacheable content and pages that are continuously changing. Things such as the login page for community members (which could be getting hit constantly depending on the size of the site), checkout pages for digital goods or courses, and discussion boards are common culprits and pain points, as these cannot typically be cached.
However, it doesn’t end there. On standard WordPress sites, the WordPress dashboard is also not cached for “logged-in” users. This is fine when you have just a few authors and admins, but when you suddenly have thousands of members using the dashboard, this immediately causes performance issues as none of it can serve from the cache on the server. This means you need the power and architecture behind the scenes to back it up. Shared hosting providers will usually cripple under these circumstances.
In the MyKinsta analytics tool that we provide for hosting clients, you can see just how much cache is being bypassed. Below is an example of a site where a large majority of the requests aren’t serving from cache.
2. A Large Number of Concurrent Visitors
The second problem membership sites typically have is a large number of concurrent visitors and sessions. On an informational or corporate WordPress site, a visitor might stay for five or 10 minutes until they find what they need (and this is a high number, usually bounce rates are much higher). On membership sites, you have the opposite happening. Visitors typically come to the site to engage with something or someone. If they’re going through an online course it’s not unusual for them to stay for hours. You can see where this is going. The concurrent visitors connected to your WordPress host adds up fast.
To make it worse, you then have a large number of concurrent visitors on top of the “uncacheable content” problem.
3. Complex Queries
Third, membership sites usually generate more complex queries, which in turn adds additional latency in retrieving the information from the MySQL database. A lot of this is simply due to all the additional moving parts and large amounts of data sites like these have. This might also be caused by sites that heavily rely on search queries for navigation or use WP_Query
.
Not to mention, you also have large amounts of concurrent users continuously querying the database.
4. Store a Lot of Data
It’s not really surprising, but membership sites store a lot of data and if not managed properly (which we’ll go into further below), your disk space can quickly run away from you. This also compounds over the lifetime of the site. Videos, courses, membership and profile information, discussions, digital downloads, etc. These are all just a few of the many different types of content which add up fast.
Do’s for WordPress Membership Sites
We host a lot of membership sites at Kinsta and our engineers are constantly interacting with these site owners on a daily basis. While we always encourage users to implement best web performance practices, these typically aren’t enough when it comes to these types of sites. So today we’ll show you a few ways to go the extra mile to ensure your membership site and its visitors have the best experience as possible.
1. Choose a Performance-Focused WordPress Host
Advice to choose a better WordPress host might seem like a broken record at this point, but the truth of it is, a lot of performance issues with membership sites can be traced back to this as the root cause. We’ve seen time and time again clients migrate to Kinsta from other providers and immediately see drastic improvements. Our entire company, from the infrastructure we place behind your sites, to the engineers we hire, are performance-focused. This has and will not ever change.
Quite impressed what @googlecloud and @kinsta can pull of for #WordPress hosting! #DevOps #Cloud #WPDev #webdevelopment pic.twitter.com/Cr7UMaHdpH
— Neuralab (@Neuralab) July 22, 2017
How Kinsta Speeds Up Membership Sites
Kinsta was the first managed WordPress host to exclusively utilize Google Cloud Platform. We offer 37 different data centers around the globe, which means you can choose one closest to your visitors to decrease latency and TTFB. While other hosts might use Google’s standard tier network (cheaper and slower), we utilize Google’s premium tier network. This is designed to minimize distance and hops, resulting in faster more secure global transport of your data.
To make your WordPress site more secure, we also also utilize Google Cloud’s enterprise-level firewall. Unlike other hosts that strictly use software-based firewalls on the web server level, our primary firewall sits at Google’s network edge outside our network of virtual machines. This allows us to block known malicious traffic before it enters our network, and reduces load on our load balancers and virtual machines.
Our hosting platform doesn’t fall into any of the traditional hosting categories and is very different from traditional shared, VPS, or dedicated infrastructure. Kinsta utilizes LXD managed hosts and orchestrated LXC software containers for each site. What this means is that every WordPress membership site is housed in its own isolated container, which has all of the software resources required to run it (Linux, Nginx, PHP, MySQL). The resources are 100% private and are not shared with anyone else or even your own sites.
At Kinsta, we make Google Cloud’s C2 and C3D VMs available on all plans.
The C2 family of machines is equipped with the latest Intel Xeon scalable processors capable of operating at 3.8 GHz sustained all-core turbo. The latest C3D series is powered by 4th Generation AMD EPYC™ Processors offering enterprise-level performance and reliability. With high-performance virtual machines powering your WordPress membership site, frequent uncached requests and database queries will be able to execute faster, resulting in a better experience for your visitors.
Every membership site can also take advantage of our scalable infrastructure to better handle sudden surges in traffic and load. This allows you to grow your WordPress membership site without having to worry about the common restraints and hard limits that other hosting providers enforce.
Read more about how Kinsta is different.
2. Take Advantage of PHP 8.1
We can’t stress enough just how important it is to use one of the latest versions of PHP, preferably PHP 8.1. For many sites, this doesn’t require any work and is a free and instant boost to performance!
PHP 7.4 is no longer supported at Kinsta. Please note that we support PHP versions 8.1, 8.2 and 8.3.
We published our PHP performance benchmarks in which we tested PHP 7.2, 7.3, 7.4, 8.0, and 8.1. As you can see below, on a WooCommerce site, PHP 8.0 takes the cake for the fastest performance! 🍰 and 8.1 was even faster.
We also tested Easy Digital Downloads and again, PHP 8.0 outperformed everything else.
If your current WordPress host doesn’t support PHP 8.0 or higher, perhaps it’s time to look for a new host. Kinsta offers and supports PHP versions 8.1, 8.2 and 8.3. You can easily toggle between them in the MyKinsta dashboard with a single click.
If your membership site has compatibility issues with the latest version of PHP, then it’s probably time to ask the plugin or theme developer why they’re lagging behind or hire your own WordPress developer to fix the issue. You don’t want to pass up on the performance improvements from PHP 8 and higher.
3. Use Object Caching
Caching makes websites faster and reduces the load on the web server. Whether you’re using a caching plugin or a managed host like Kinsta that has server-level (page) caching implemented, this is something you should already be doing. However, when it comes to WordPress membership sites, your common caching setups are usually not enough as they don’t always take full advantage of it. This is where object caching comes into play.
Object cache stores the results of database queries so that the next time that particular bit of data is needed it can be delivered from cache without querying the database. This speeds up PHP execution times and reduces the load on your database. This becomes extremely important with membership sites! With WordPress, you can implement object caching in a couple of different ways:
- A third-party caching solution such as W3 Total Cache
- Redis (recommended)
- Memcached
We offer Redis as an add-on at Kinsta so you can take full advantage of persistent object caching for your membership sites. The great news is, once it’s configured you can still use the Clear Cache option added to your website admin area by the Kinsta MU plugin. This button will clear both our page cache and any object caching active on the site.
In some cases, we can also cache a specific page or URL for logged-in users. However, you will need to first chat with our support team about this as it’s important you understand all of the ramifications of enabling this.
4. Enhance Your WordPress Search
As a membership site grows, you’ll probably discover the standard WordPress search functionality isn’t going to be enough. Sites that heavily make use of WP_Query, use search as their primary means of navigation, or even a site with a large number of posts might run into performance issues, as search query times start to pile up. This is where a search engine such as Elasticsearch can help.
Elasticsearch can be used to speed up querying of the WordPress database. This is done by building an index of the content of your site’s database and then using Elasticsearch to search this index much more quickly than a MySQL query is capable of performing the same search.
5. Create a Light 404 Page
We’ve seen first-hand that membership sites typically generate a lot of 404 errors. Your site is probably generating more than you think! Our MyKinsta analytics tool can help you determine the exact amount (as seen below).
You can also check 404 errors in Google Search Console or install a third-party plugin such as Redirection which logs 404 errors. However, remember that plugins like these also have an impact on performance. It’s much better to rely on a server-level tool.
The reason these errors are bad is that many 404 pages are very resource intensive. For a membership site, you’ll want to avoid a heavy 404 page. Create a simple 404 template that avoids querying the database any further if possible. And of course, spend some time and fix the 404 errors as this is not only resource intensive, it’s simply bad for the user experience.
In addition to utilizing a light 404 page, it’s also a good idea to add a special page cache rule for 404 pages. If you’re a Kinsta customer, you won’t have to worry about this. Our Nginx configuration caches 404 pages for 15 minutes. If we detect that a new page with the same URL as a cached 404 page has been created, we’ll purge the cache as needed. If your WordPress site does not have cacheable 404 pages, we recommend working with your host to add this capability to your web server.
6. Increase PHP Workers
PHP workers might be a term you’ve never heard of, but they are how many hosts, including Kinsta, handle limiting requests (rather than limiting you by CPU or RAM, which is typically what shared hosting providers do).
PHP workers determine how many simultaneous requests your site can handle at a given time. To put it simply, each uncached request for your website is handled by a PHP Worker. For example, if you have 4 requests that come to your site at the exact same time and your site has 2 PHP workers, two of those requests will get processed while the other two will have to wait in the queue until the first two have finished processing.
Remember we discussed earlier that one of the biggest problems with WordPress membership sites is all of those uncached requests. This is why PHP workers become very important as they have to do work for each request. Therefore, these sites will typically require additional PHP workers to ensure every request is processed without delays and completed successfully.
What happens if you continuously max out your PHP workers? Basically, the queue starts to push out older requests which could result in 500 errors on your site. Each of Kinsta’s hosting plans includes a predefined number of PHP workers. If you have trouble estimating what your site might need this guide will be useful: Estimating the Number of PHP Workers Needed. But you can always chat with our sales or support team as well.
7. Perform Regular Database Maintenance
Regular database maintenance isn’t just recommended for WordPress membership sites, it’s required! If you don’t do this, one day you’ll probably be wondering why your site has come to a crawl. Here are some recommendations:
Clean up Autoloaded data
Autoloaded data is data that is loaded on every page of your WordPress site. This data is stored in your in your wp_options
table. On large sites, this table can quickly grow out of control. Check out our in-depth tutorial on how to clean up autoloaded data.
Clean up Transients and CRON jobs
Just like with autoloaded data, you should also regularly clean up transients. When working properly transients are supposed to expire and remove themselves, but this isn’t always the case. If something is misconfigured or even corrupt these can begin to really stack up.
For example, we had a client where something went wrong with transients expiring and it brought the entire site to a crawl. After digging into it, we discovered the site had 695,846 transient records (rows) in the database. Upon deleting the rows (which contained transients which should have already expired), the site immediately recovered (as seen below).
You can use the free Transients Manager plugin to view, search, edit, and delete transients on your WordPress site. If you’re a little more tech-savvy, you can also use WP-CLI commands to clear out transients.
CRON jobs (WP-Cron), used to schedule repetitive tasks for your WordPress site, can also have similar issues. You can use the free WP Control plugin to check and make sure your CRON jobs aren’t getting out of control.
Change Database Engine to InnoDB
Last but not least, you should move your database engine to InnoDB if you haven’t already. A lot of older sites are still using the MyISAM storage engine in their database. Over recent years, InnoDB has shown to perform better and be more reliable. A big reason to use InnoDB over MyISAM, is that you won’t run into issues with full table-level locking. This allows your queries to process faster.
Check out our tutorial on how to convert your database (tables) from MyISAM to InnoDB. If you migrate to Kinsta and have our engineering team assist you, we automatically move your database engine to InnoDB.
8. Offload Data
As we mentioned earlier, membership sites simply have a ton of data! Videos, PDFs, full-resolution photographs, documents, and audio files tend to be the biggest culprits. Therefore, you might need to figure out a way to offload this to a cheaper storage solution. This can save you money by simply having to upgrade your hosting plan. Check out the following articles:
- Offloading storage of PDF, DOCX, MP4, and MP3s
- How to offload large files to Amazon S3
- How to offload media to Google Cloud Storage
Dont’s for WordPress Membership Sites
Here are a few things you shouldn’t do on your WordPress membership sites.
Stay Away From Post Counters
Never add view/post counters to your site if you don’t have to. For example, avoid things like “792 posts” next to a user’s avatar in forum posts or “5,243 views” when listing forum posts. When you have a long discussion these counters will take a huge toll on your database. In general, minimize the use of counters and only use them if necessary.
This also goes for social counters. Notice that we do use these on the Kinsta blog, but nowhere else on our site. But our plugin also has caching built-in, this ensures they aren’t generating queries on each page load.
Avoid Page Builders
Page builders are great for a lot of folks, in fact, we even have an entire list of ones you can use on your site. However, most (not all) of these have performance implications as they generate additional unnecessary code to make the page render in the way that user can still build it without knowing how to code. If you can, code your page templates by hand and always make them as light as possible.
For example, our Kinsta website (as seen below) is in WordPress, but the entire theme is actually coded by our in-house developer. This helps us reduce some of the bloat that large WordPress themes typically have but allows us to still take advantage of all the amazing functionality. Take a look at this collection if you are looking for the best WordPress membership themes. Again, there are thousands of talented WordPress developers and designers out there at your disposal if you need help.
Don’t Use Too Many Plugins
We know you’ve heard this before. The truth is, the quality of a plugin’s code is more important than the total number of plugins you have installed. However, with that being said, each one is still going to have a “performance cost.” 🐢 If you’re no longer using features from plugins, deactivate and remove them from your site. Not only does this make troubleshooting things easier, but it will most likely decrease the number of queries on your site (both on the backend and frontend).
Be Careful With Third-Party Integrations
There are a lot of third-party CRM and automation platforms out there that you might want to integrate with your WordPress membership site. However, be careful with these as some may introduce additional latency and delays while communicating with their APIs, services, etc. You might want to look at solutions built inside of WordPress, such as these CRM solutions.
Not to make it more difficult, but the opposite could also be true. If a third-party CRM or automation platform is handling a lot of its own tasks, it could in fact help take the load off of your WordPress host. The best way to know for sure is to test different solutions.
Additional Recommendations
And of course, we can’t let you leave without mentioning some of the more common speed optimizations you should already be doing:
- Compress your images! At Kinsta we typically see 60-70% savings depending on the types of images and what form of compression you’re using. We recommend lossy compression.
- Always use a CDN. Even though we have 37 data centers available to choose from at Kinsta, your server is still going to be far away from someone. A CDN can fix this by copying and delivering your assets (images, JS, CSS) from POPs around the globe. Our Kinsta CDN is included for clients.
- Think twice before you decide to manage your own VPS. Trying to be a sysadmin to save $20/month is a bad idea.
Summary
WordPress membership and community sites are definitely in their own category when it comes to optimization. They usually require going the extra mile if you want to see excellent performance. But the great news is, many of the solutions out there can do wonders. PHP 8.1, Elasticsearch, and Redis Object Caching are all easy and effective ways to see instant results. And of course, having a performance-focused host should always be at the top of your list. 😉
Do you run a WordPress membership site? We would love to hear your thoughts or struggles you’ve encountered along the way.
Awesome article Brian, I wish I’d known about all of these things sooner :-) We’re running a health based non-profit with a BuddyPress community attached to it and we had so many issues once we got even a couple of members active at the same time. Pages would take forever to load and basically the site became unusable.
We were with WPEngine.com before but they could not really help us get the community running smoothly. In the end one of our volunteers found WeFoster.co and they helped us with getting things running smoothly again (I think they only host WordPress communities)
One thing we’ve learned is that it’s better to go with a more “expensive” host that is familiar with hosting communities and I’ll add Kinsta to the hosts we recommend in our Facebook group :-)
Hey Sarah!
Sorry we couldn’t get the post up sooner. There are a lot of people struggling in your similar situation with community sites. That’s where Kinsta can help. But sounds like your on the road to improvement.
We would greatly appreciate any recommendations :) Thanks!
Great stuff, Brian.
We [at MemberDev] are in the process of moving all our customer membership sites over to you (from WP Engine). While our motivations were not purely performance driven, it’s great to see that your team recognizes those challenges + additional considerations.
I love the “Don’t” around page builders. We build all our themes from scratch as well :)
Looking forward to more membership related content!
Hey Ali,
So glad to hear that! We’ll make sure to push out more membership related content in the future.
This is a great in-depth look at why membership sites take a different level of hosting. As a software developer of the AccessAlly membership + LMS tool for WordPress, we’ve often recommended that our clients move off of certain hosts because of the reasons you list here.
The biggest thing that wasn’t mentioned that I’d love to add is that often you’ll want your membership site to communicate with a CRM or automation marketing platform.
When the WordPress server is slow or doesn’t receive these “pings” or “Webhooks” back from the CRM (think Infusionsoft, ConvertKit, Drip, ActiveCampaign, or Ontraport) then the site doesn’t work the way you’d like.
I’m excited to discover Kinsta and see if it makes sense to recommend it as a solution for our AccessAlly membership site owners!
Hey Nathalie,
You’re definitely right! Therefore we just added a “Be Careful With Third-Party Integrations” section above.
We would love to work with AccessAlly membership site owners. ?
Hi Brian another great article and I’m really pushing for our clients to move to Kinsta I personally feel its a great hosting solution for anybody who has a membership/LMS WordPress website.
Great, glad to hear it Jonathan!
Great points to be noted. Thanks for writing and sharing.
Oh! I wish I had seen this earlier. I am constantly running into 500 errors.
I asked the hosting provider and they couldn’t really help. I am switching, but here is my question. What if I don’t have a choice but to use page builder, is there a solution to that?
Hey Jagunmolu!
We recommend avoiding page builders if possible due to extra code and overhead. But thousands of sites at Kinsta are using page builders just fine. If you aren’t a designer or programmer, a page builder definitely has its advantages in terms of being able to easily create that you need. Using a page builder at Kinsta is not a problem.
Thank you for this awesome information. I’m currently bidding for a membership site redesign and wanted to spend some time researching the best WordPress hosting options for membership sites – and I came across this article. I love how you broke everything down and addressed all of my concerns with using a regular or a shared web host. I was comparing you to Flywheel, Siteground and WPEngine. I’ll recommend you to my client in my proposal for sure!
Glad to hear it Chrissy! We host thousands of membership sites at Kinsta, so our team is very familiar with everything mentioned above.
Thank you brain, I would like to ask few question.
1: memcache and Redis which is better seems they seems to be alot comparison
2: which of WordPress membership plugin is light weight because my site only need users to create a profile and be able tk change and manage there profile only.
3:Do you think buddy press consumes lots of cpu if you deactivate function like activities, notifications, message and connection since I already told you I need just a plugin to manage user profile only.
Finally what type of hosting plan will you recommend and what is the specifications of the hosting because from your article you did not mention that, assuming we are using a manage Vps server what is server specifications that can handle at least up to 30k/active members.
Thank you and looking forward hearing from you.
Hello Frank,
1. Memcached and Redis both offer in-memory caching, but they’re also quite different. In general, Memcached is easier to set up and acts more as a simple key:value layer. Redis, on the other hand, is capable of caching more complex data structures and can be configured for more complex use cases. In our tests, we found that Redis is better for our WordPress stack.
2. I don’t have extensive experience with membership plugins, but in the past I’ve used Restrict Content Pro and found that to be fairly lightweight.
3. I have not personally used BuddyPress before, so I can’t speak to which configuration would be best for low CPU usage. I’d recommend testing with various settings disabled and using a tool like New Relic to do some resource monitoring.
4. The required specs for a server really depends on how optimized your PHP processes and database queries are. For example, if your average PHP response time is 5 seconds, a site with an average response time of 500 ms will be able to handle much more load with the same amount of resources. You also have to factor in any caching layers like Redis or Memcached. If you are looking at server options, I’d recommend starting with a high end configuration and then scaling down as you compile more data about how the server is handling load.