Issues with W3 Total Cache and Buddypress on Multisite
I was hoping to get anyone else using total cache and BPMU to drop any known issues and fixes here. I’ve started using it again and it really does make everything a lot faster. But it also creates some problems with BP components as well as MU functions. Such as:
Multisite function switch_to_blog bug.
BP Private Messages freeze
Activity Update delay
…I’ll keep adding them as I see them.
What settings are you using? I’m using it on BP-Tricks but I’ve talked to Frederick (the plugin dev) on WordCamp and he basically told me that it’s a good idea to turn off page Caching and Database caching when you use BuddyPress and only use Object Caching, Minify and a CDN.
Page Caching Basic, Database Caching Basic, Browser Caching.
I just figured out that Object Caching was messing up my Private Messages component. When logged in and bouncing from profile to profile and trying to PM a member sometimes the ?r=membername&wp_nonce=XXXX becomes frozen on a previous membername. Turning off the object cache fixed this so I don’t know what if anything could be doing inside the object cache advanced settings can be done?
I’ve gone ahead and removed Page Caching. Which only leaves me with Db Cache, Browser Cache and Minify(even though I haven’t set any .js or css at all) – I guess removing the page cache should resolve the activity update delay. I’ll turn off Db cache then I’ll only be using Browser Cache and Minify(somewhat)…hm…doesn’t sound like much anymore…hehe.
I also read that the switch_to_blog fix will be coming in the next release.
I’ve also setup my admin’s secondary sites with their own total cache individual activations with all settings except CDN(since I’m still trying to figure out how to do that). Doing it this way helps tremendously since I have the blog and other primary sections on secondary sites. I only have Buddypress on the main site, nothing else. I don’t have any caching for member blogs…as I haven’t figured the best way for that.
Only having BP on the main site has alleviated it of about 20 blog plugins and the other hacks for the blog. I think that has been best thing for it to avoid conflicts.
Mines on MS! But my problems are probably my own causing
My users can’t post to each other and you cant change avatars its endless login loop If you know what I’m doing wrong would love to know! lol they can update their own page which is good. but alot of functionality not there right now http://www.pandragon.com/members/livefree247/
been having hard time getting it to work!
I’d love for someone who’s using W3 Total Cache successfully on their blog to do a blog post on what/how they implemented it. Or even better would be to create a Codex page on the best way to implement it and which options to turn off. Plus, whoever does it will get the benefit of the communities input on even better ways to tweak the setup.
i second that emotion…plus, I just got another bug popup here. I cannot edit site theme for a member site. I try selecting a theme to be active only on the specific site and it just kicks back after I save…no save. I was getting a message at top from total cache saying something about syncing cache by emptying cache to set things right. I did that but still I can’t activate a theme for specific site.
That will be awesome @bowromir I look forward to it since I’ve wanted to implement it, but haven’t had time to test it all. A tutorial to start with would be great. Hopefully you’ll offer your post for the codex as well and put a link at the bottom of the codex article to your original post.
Glad you guys are looking forward to it! I’ll submit it to Codex if there’s a need for it, sure
@bowromir did this tutorial ever get finished? I’m holding off releasing my site until I get a good working cache configured.
@twig.. No I’m starting on it this weekend. Have been busing finishing up other stuff.. But it’s on the works
Install and Configure W3 Total Cache in 7 Easy Steps
Apparently, you’re guide isn’t made for BuddyPress. I may be wrong here, but I’m pretty sure just about every person who has used Page Cache with BuddyPress had to disable it.
@oneearth.. Sure I can give you what i have so far. Here it is:
Series: Setting up W3TotalCache with BuddyPress – Part One
W3Total Cache has taken the WordPress world by storm this year. In my opinion it is by far the greatest performance tool for WordPress, and some of it’s features can be used to speed up BuddyPress as well. It has taken me some time to figure out the best settings, and with something as complicated as this, the results may vary. In this (lengty) trick I’m going to take you through the process of setting up W3Total Cache in the following order;
1: About W3 Total Cache and Installation
2: Server setup
2: Setting up the options that play nice with BuddyPress and your hosting setup
3: Using a CDN with MaxCDN
4: Hosting your Theme files and (group)avatars with the CDN
6: A word from the plugin author Frederick Townes
As you’ve probably seen, this is quite an extensive guide, and so I decided to split this post into 2 parts.
About W3 Total Cache and Installation
Plugin author Frederick Townes described W3 Total Cache as follows:
The fastest and most complete WordPress performance optimization plugin. Trusted by many popular blogs like: mashable.com, pearsonified.com, noupe.com, webdesignerdepot.com, freelanceswitch.com, briansolis.com, tutsplus.com, yoast.com, css3.info and others — W3 Total Cache improves the user experience of your blog by improving your server performance, caching every aspect of your site, reducing the download time of your theme and providing transparent content delivery network (CDN) integration.
Sounds impressive? Well it is impressive! So let’s install this plugin by going to your plugin browser and searching for W3 Total Cache. When you’ve found it, click on “Install” and that’s all you need to do install it.
Before we start with setting up the plugin, it’s important to tell you something about the general hosting of BuddyPress sites. Depending on the size of your community
Selecting the options that play nice with BuddyPress and your hosting setup
The hardest thing about using W3 Total Cache are the options that you cannot use in combination with BuddyPress. Because of the way that BuddyPress works and meant to be used (as a social networking tool), page caching and database caching causes trouble with the highly dynamic content that is being added to your site. Things like the activity stream will stop to function correctly if you simple enable all these features. I’ve read many times that the plugin “does not work” or “breaks” BuddyPress, but this is simply not the case. It only “breaks” if you try to use it for things that simply are not meant to be used with BuddyPress.
What caching basically does is taking a snaphot of a page at certain time intervals and serving that to the visitor when he visits that page (it’s more complicated then this, but this works to explain it easily). Now this works great if it takes a snapshot of a blogpost, because the content of a blogpost does not change every couple of minutes. But what happens when this concept is applied to your Activity Stream, Profile pages and Groups? You’ll see outdated data on the page, because in the meantime new content like status updates or group updates have been posted by your community. This explains why you can not use these features with BuddyPress.
But not to worry, there are plenty of feature you can use, and thus allow you to drastically speed up your site (just not as much as on a regular old -boring- WordPress site.
Here’s a screenshot of what you can enable:
Minify:Minification can decrease file size of HTML, CSS, JS and feeds respectively by ~10% on average.
You can enable minification and configure it by visiting the Minify settings in W3TC it’s admin settings. Here’s how I’ve set it up on BP-Tricks:
Depending on your hosting configuration you can choose which Minify Cache Method you want to use. If you have a dedicated server or VPS server and have something like APC, XCache or eAccelarator installed then use one of those tools. Or else you can just use the Disk method.
If you have a shared server your only option is the disk method.
Object caching: Object caching greatly increases performance for highly dynamic sites (that use the Object Cache API).
This feature so far has proven to work great with BuddyPress, altough it should be used with caution if you’re on a Shared server because sometimes it can actually decrease pageload times on your site. If that stuff happens it might be best to look into a cheap VPS or dedicated server. A little bit of information about the setup being used on BP-Tricks will be given in part two.
Content Delivery Network: Host static files with your content delivery network provider to reduce page load time.
This feature is probably the most useful for us BuddyPress users. In part two there will be a detailed step-by-step guide in setting up your CDN, so serve not only your theme files, but only your avatars, BP-Default Theme files and your essential plugin files!
Browser Cache: Reduce server load and decrease response time by using the cache available in site visitor’s web browser.
Gzip compression of your pages can also help speeding up your load times. Here’s what I have enabled for all sections on the page, and seems to do it’s job perfectly:
Set expires header
Set cache control header
Set entity tag (eTag)
Enable HTTP (gzip) compression
Here’s a screenshot with all my settings:
To check if gzip compression works, you can go to http://www.gidnetwork.com/tools/gzip-test.php and check your domain and see Gzip is working.
Still working on the rest, this is all pretty general info.. But maybe it does help some of you
Very helpful thanks @Bowromir
Re the gzip part… I have checked and it is enabled on my server
but I have no idea how to implement it.
Where/how do you set those things?
Thx – DV
You don’t have to enable anything. your browser will use gzip compression and it would load pages faster
Concerning the switch_to_blog conflict: I learned by placing this ` ` after the switch_to_blog/restore_current_blog, that the url links are corrected when Totalcache is activated. So temporary fix on that front. I use switch_to_blog alot so doing this isn’t ideal, so i’m hoping it is fixed totally in the next release.
I also learned that Object Cache screws up subdirectory urls for example mysite.com/subsite doesn’t work and only mysite.com/subsite/ works with the Obect Cache activated.
just 2 tidbits there.
- The topic ‘Issues with W3 Total Cache and Buddypress on Multisite’ is closed to new replies.