Speeding up wordpress

We’re building a site on dreamhost with wordpress on a VPS… right now we’re using some plugins (primarily S2 membership, buddypress and bbforum) - our load times fluctuate between 10-20 seconds - which is unacceptable.

We’ve tried caching but it really harms the experience on such a social site. We’ve used the P3 profiler to identify that its the plugins and/or the server that’s causing everything to run VERY slow.

Any ideas on whats going on?

PM me for the address.

Ok - so I’ve got my site running locally and the Time to First Byte locally is under a second (about 800ms). On Dreamhost, it’s about 6.3 seconds. Same plugins, different environments.

What’s also strange is that according to P3 - it runs only an avg of 57 sql queries locally… On dreamhost, 171 queries.

Thoughts? I’m thinking the VPS isn’t configured correctly…

If you’re on a VPS, have you turned on xcache? Caching on social sites is tricky, as you can’t really use file caching much, and logged in users obviate most caches (no one servers cached pages to logged in users basicaly)

Yes. Xcache is on to my knowledge (how can I verify?). Yeah - the issue I’m having explaining this to DH support is that on my local - it flys. TTFB is under a second. On DH - its 6-7 seconds. The backups are identical. Process of elimination says its the environment.

On local no one is hitting it but you :slight_smile: You’re right, it IS environment, but part of that is traffic. If no one but you visits a site, it’ll be fast. If everyone visits the site, it gets slower. So support totally understands that it’s faster on your local box, but it doesn’t help us much, since we can’t replicate that … unless you want us to kick everyone off.

Go to domain manage - https://panel.dreamhost.com/index.cgi?tree=domain.manage& - and click on edit for the site in question. Make sure xcache is on.

If you want to give me your support ticket number or domain name, I can take a look and see if there’s anything I notice out of the ordinary in WP or the server. Just keep in mind, BuddyPress is a memory HOG :confused: Love it, but oy it’s busy.

Well - No one is hitting the site aside from me really… Its not really public and not on the main domain. So any traffic would be random spammers… no real traffic…

The support ticket is #79679254.


The other thing to remember about localhost is that everything is right there. You don’t go to another machine for your DB, you don’t have to traverse the net at all just to get to ‘home’ because you’re on the server. I suspect if you logged into the server directly (no you can’t, sorry), and loaded the page, it too would fly because it’s local.

Which is CRAZY annoying, BTW. Makes me drink more coffee.

I pulled up the ticket (sorry about the delay, we had off-site training classes this week which messes my schedule!) and the first thing that jumped out at me is that our tool wp-cli doesn’t work at all. That lead me to look at your plugins and you have a LOT of plugins.

Now I’m not a member of the “ZOMG! More plugins are BAD!” club, because it’s not about the number of the plugins, but WHICH plugins.

Step one for you is turning 'em off. Yeah, I know, I know. I would remove the Google Analytics (because you can use Page Speed Optimization to include that without touching WP, AND Page Speed Optimization works well with BuddyPress and obviates the need for other minification plugins). I’d also dump wp-crontrol and p3-profiler for a ‘real’ test. Those are okay for debugging, but you shouldn’t leave them (or all the logging that you have on in your wp-config) on all the time.

Speaking of the wp-config, you’ve got ‘cache’ defined twice. That won’t break stuff, but it’s still not a great idea.

Personally I don’t use anything like wordfence because while I like the idea of keeping things secure, I don’t think that having WP do it’s own security is good for performance. Puts too much weight on WP (same as why I don’t like caching unless I need it). Of course, you’re on a VPS, so you can turn on x-cache and hook W3TC into that and make the dyanmic cache faster. Also don’t forget to use browser caching in w3tc. Totally worth it.