WordPress Question: How Can You Make BuddyPress Load Faster?

How to improve load speed in BuddyPress and WordPressAre you experienced with BuddyPress? This is another interesting question that came up during our WordPress Q & A last week.

Submitted by a WPMU reader named Kris:

We are running WordPress MU and BuddyPress as one blog setup, but the site seems to be quite slow.

Would it make it faster if we had a two separate installations? One for our WordPress blog (with all the content etc..), and another installation for users to access Buddypress. A single login would need to work across both of these sites.

I assume this would make both sites load faster, as some plugins are needed only for WordPress, and some are specific to BuddyPress.

Are there any other benefits/drawbacks to this idea that I’m not aware of?

Thanks,
-Kris

Can anyone help Kris out with this? If you know a thing or two about BuddyPress, please leave us a comment below this article and share your thoughts. In the spirit of Christmas!

Thanks for the photo: Bioxid.

21 Responses

  • Short answer, yes: not loading code where it isn’t needed will always yield a performance gain.

    Long answer:

    Having an adequate server to handle the load & traffic with appropriate caching will provide the quickest results.

    This is also BuddyPress core problem with advanced multisite installations, in that you cannot setup a group of sites within a network to load BuddyPress on while not loading it on others. There are ways to work around this, but nothing easy in core.

    You could use multiple WordPress installations sharing user tables, but that’s also twice the code to maintain, Akismet keys to setup, etc…

    The approach I’ve used in the past is using the WP Multi Network plugin to create a second network, so you’d have one with BuddyPress and one without. This gives you more control over what networks have what plugins & themes installed, at the cost of complicating your installation slightly because the Network/Multinetwork UI isn’t as fleshed out as it could be.

    This doesn’t solve the issue of server resources being used, as the load brought on by the community side is still negatively effecting the users of the non-community side, but it does prevent loading BuddyPress where you don’t want it to load.

  • Sorry to be cheeky :) it just occurred to me

    Would the same apply to bbpress? a separate network with BBpress plugin to run forums more efficiently
    (at the moment buddypress powers our forums, but we plan to move to bbpress when conversion script is available)

    • Good question. My opinion is that it’s the same, but different. :)

      If you want your bbPress forum activity to create entries in your users Activity streams, you’ll want to keep BuddyPress active on that site. Also having two separate profile pages (a bbPress one, and a BuddyPress one) might be confusing to your members. If these are not important to your particular need, the premise is the same as above.

      I do recommend setting up your bbPress site-wide forums to be on their own site if you can. Then the forums, topics, and replies aren’t commingled with your main blog posts in the same blog. It won’t effect importing, exporting, etc… but on a fairly active forum you run the risk of slowing down database look-ups for your blog because of the number of db rows bbPress has taken up. For most people this won’t become a problem until much later down the road, but might still be worth planning for.

  • I don’t have a solution but just wanted to add another voice saying that this is an issue we are having as well. Our site is a WPMU setup with BP running on it as well. We only have about 70 members on our site as we are two grade 7/8 classrooms who are 2 700 kms apart who are collaborating in one space. The slow load times are something that we run into as well. We sometimes have kids that take 10+ minutes to get logged on to our site. Be interested in seeing what people have for solutions to this one.

    • Anything beyond several seconds is worth looking into. If your page load times are taking several minutes, WordPress and BuddyPress are probably not the root cause.

      • Working inside of the often restrictive firewalls of a school is often an issue for logging in to almost any site, but I agree that the load times mentioned can be completely unreasonable. They can also be caused by 30 kids trying to squeeze in to a wireless port at the same time that the teacher says “go here now.” Something that I need to talk to my host about as well most likely.

  • Design Lord, Child of Thor

    @Clarence – having worked with schools and WP/BP as well, bandwidth in the school is a often a bottleneck + firewalls/filters in education. The next thing I find that throttles site speed is the server. If it does not have much processing power and RAM, 30 kids logging on simultaneously can slow things down a lot. I’m currently running on Amazon Web Services on a high CPU instance and it is significantly faster than a small instance server (on AWS)

    I have also set up Varnish reverse caching proxy server so that non-logged in users get served pages that have been cached in RAM. I’m also running xcache for bytecode caching of PHP as a module of Apache – although I haven’t done any tuning of this beyond just turning it on – and could probably juice some more speed out of my sites if I did. I also installed Google’s mod pagespeed to try to speed up Apache as well. It does have an appreciable effect when it is turned on versus being turned off.

    I must add that all my server is doing is serving WordPress / BuddyPress sites, so I have optimized it for this purpose.

    I would suggest that optimizing

  • Don’t split them up – that’ll actually INCREASE the load (unless they’re going to completely different servers, in which casse it’ll just increase the complexity). Instead, fix the root problems…

    1) Caching!!! If you’re not caching, don’t ever complain about performance. This is absolutely the VERY FIRST thing you should do to EVERY WordPress-powered site. This should only take a few minutes to setup, and will ensure that the actual *interactive* load is available primarily to those who need it: the users that are logged in or are actually interacting with the site, and not just viewing it.

    2) Server setup. After web caching, this is the most significant performance boost. Make sure your mysql database is setup to support the appropriate number of connections, with sufficient caching, memory and indexing. Ensure that Apache/PHP is setup with sufficient connection allowance AND that PHP has sufficience, but not too much, memory for the tasks it actually needs to perform. This could take from minutes to hours to configure correctly, but the performance gains are very significant, and will help every single visitor.

    • how can i pay you to help me!!!! with caching im new to the game and im stuck!!! and now im convinced that caching is my problem.

      • You can contact me thru my website, but ANY wordpress developer or host should be able to set you up with a caching system pretty easily…if you’re already working with someone, just tell them you need a caching plugin setup.

    • What cache do you use with Buddypress. I’ve found that the cache plugins mess with my members page and shows members 7 – 15 times each when I use the cache plugins.

  • New Recruit

    Nothing new compared to anyone else’s comment but if you run a large site and are on shared hosting you can try other shared hosts that are not known for massively overselling servers. or move to your own server.

    If on your own server make sure your web server and php settings are capable of handling the load. Try apc or memcached.

    Could TRY cloudflare. It’s made a difference on my own servers. With dynamic content it is not *as* noticable but it’s like a free CDN for all your scripts and images which can help load times

    Within your install make sure you don’t have unnecessary plugins installed, and plugins maybe not updated recently see what the code looks like and if it is slowing you down, and maybe look into your theme as well

  • New Recruit

    If you have a site with any level of popularity, you really should upgrade to a virtual private server (VPS). Shared hosting is super cheap, but hundreds of websites are likely to be hosted on the server you’re on, so it’s very normal for load times to be very slow at times.

    So getting a VPS (I’ve seen them as low as 25 bucks a month) cuts that down so you have a section of the server processor and memory that is just yours, so unless you’re REALLY putting a bunch of work on the site at the same time (hundreds of page loads at once), then you’re not going to notice.

    You can also speed up any site using a free service called CloudFlare, as well as caching plugins. If your site is image heavy, those two things can help cut down bandwidth use quite a bit. There are paid services that do this even better, like MaxCDN, and Amazon can be used with a plugin called WP Super Cache, and is pretty cheap since it only charges you for bandwidth used and bandwidth is dirt cheap on Amazon.

  • The problem with buddypres’s slow loading is the CORE itself.to many unnecessary function calls and code duplication.
    Also they have to start working more toward a MVC structure and get rid of any kind of injections (JS,HTML OR CSS).

    One more thing , the default theme is a nightmare for any theme developer to start with. It’s definitely the worst theme I’ve seen so far build in WP!

    Conclusion:
    It seems to me like lack of organization and good leadership is going to kill this project for good.:(

    p.s I as many I know are willing to help but those who dictate are not willing to accept it,that’s the reason I’ve finally stared working on my own social networking solution..

  • Design Lord, Child of Thor

    @uloga kind of dropped a bomb on us all here… any replies? Either from WPMU staff, (@John James Jacoby) BP/BBP leaders, community members?

    As a fairly newbie, non PHP/programming guy, my only ability is to “get a sense from the community”, so having uloga’s response unanswered is currently somewhat concern-inspiring, given that I’m a budding BP enthusiast…

    • I addressed this above: Caching!

      The very first thing you need to do to any WP site is setup caching. Caching bypasses the performance caused by EVERY plugin or theme, and WP core, because that slow-processing code only has to run when it’s refreshing the cache. Regular visitors and search engines will all experience a major performance increase immediately.

Comments are closed.