I currently run a wp/woocommerce site that's been optimized as far as I can take it for an Apache server:

MySQL memory optimized WP Rocket MaxCDN

VPS: 2 cores 2 gigs of ram SSL

The site offers about 50 different services while it updates & cycles through orders every hour. It's a WP/WC site so it has a small blog and account area for customers. There will also have some free web based tools available soon.

My biggest bottleneck is probably PHP and around 70 requests to the server on page load.

From what I've been reading Litespeed is still faster, but I'm not sure if I'll see much of an improvement if my apache server is already optimized, especially if I change to fastcgi. Also, it's not very clear to me what some of the limitations may be. The last thing I want is to change web servers to find parts of my site stopped functioning.

Do I need to worry about my PHP scripts not working with LiteSpeed, or can Litespeed handle everything you could throw at an apache server?

  • If PHP is your bottleneck, changing the web server won't help that much. Focus on finding out what your bottleneck actually is, and then you will know where to spend your time. – Michael Hampton Mar 13 '17 at 20:17
  • You need to work out what the problem is, but typically PHP uses a lot of CPU. Make sure images are served by your web server not PHP. Typical solutions include caching and making more CPU available. Changing web servers is not typically going to help this type of problem. – Tim Mar 13 '17 at 20:49
  • @tim Thanks for your input. I'm considering making a couple server upgrades, (4 cores, 4 gigs of ram, & SSD). Also considering nginx reverse proxy with apache and using fastcgi on top of that if it's possible. I'm not a network engineer, but I have a managed plan so my webhost will configure all this. It's just a matter of knowing what I want them to do. – nickyb Mar 13 '17 at 21:01
  • No point putting a reverse proxy in, given what you've told us. You need to do more analysis and really consider caching. If you can cache a page that's not authenticated, so you don't have to hit PHP, you might not need to buy a bigger server and you may speed the website up. – Tim Mar 13 '17 at 21:12
  • @tim What kind of analysis or tests do you suggest performing to figure this out? Aside from using a good caching script, CDN, and optimizing the server's memory for mysql (which I have done) I'm not sure where else to look. All these suggestions are greatly appreciated by the way. – nickyb Mar 13 '17 at 21:20

Litespeed has an ESI which supports section cache. Also it's wordpress cache plugin has a particular custom thirdparty support for woocommerce.

Just give it a shot:


Theoretically, partly cache for your site should at least help you speed up those 70 requests per page load. Server level cache should make wordpress faster than php level cache. That is why it is faster than super cache I think:



The reason I recommend Litespeed for this situation is Litespeed can cache block and serve different content even using same URL. Have a look at https://nyphper.wordpress.com/2017/02/23/how-to-use-litespeed-vary-to-generate-different-caches-for-one-page-url-php/

This is a easy test to understand this smart way:)

  • Nginx and Apache can both cache pages relatively easily. – Tim Mar 13 '17 at 22:21
  • @Tim If they can support block cache, it should be ok too. – Highlight Mar 15 '17 at 16:29
  • I use Nginx as a page cache. If an anonymous user wants a page PHP isn't invoked, saving a lot of CPU time and actual time. For logged in users you need plugins or other forms of caching. – Tim Mar 15 '17 at 17:56
  • @Tim Can you server different cache for one link based on cookie? e.g. an anonymous user may choose two kinds of listing style: grid or list. Or choose different sort by. – Highlight Mar 15 '17 at 19:58
  • I believe page cache is purely by URL. If the url has a sort parameter the results will be cached correctly. If it uses another technology it's possible the page cache won't work. You can exclude users with cookies from caching, but I don't think you can change what's returned based on it - typically page cache isn't useful for logged in users. Many websites are "read mostly", so caching only anonymous reads can significantly reduce load. – Tim Mar 15 '17 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.