Setting up high performance WP+Woocommerce site on OLS

#1
Hi everyone,

So I recently setup a new Cyberpanel installation on GCP cloud but didn’t noticed any performance improvement compared to other providers, I intend to use it for my Woocommerce based site.

As I read most of the WordPress managed hosting providers use GCP + Nginx setup for their offerings like Kinsta, Siteground etc. Or Paid server panels like Gridpane, SpinupWP, Runcloud, Ploi, D2C or Free options like Easyengine, WordOps, Caprover etc.

They all tend to use Nginx+FastCGI caching option or use Nginx server + Redis Cache for Woocommerce.

I have used most of them except Kinsta didn’t got time to try because I found about OLS + LScache plugin.

What I would like to know if any users who are more experienced with litespeed server managing successfully their WP + Woocommerce stores, what settings are you using for your woocommerce installations .

Can you share some information on setting up LScache plugin, using OLS or LS enterprise:
✓ Setting up LScache + CDN, do you use any page rules in Cloudflare.
✓ Image/Font Optimization tips.
✓ CSS / JavaScript Selective loading
✓ Using any other optimizations plugins with LScache
✓ Do you use Redis cache or Memcached with LScache plugin.
✓ Do you remove unnecessary CSS/ JavaScript from posts / pages.
✓ Are you using quic cloud cdn & can this enable quic protocol with OLS.

I usually tend to use less than 30 plugins on most of the WP installations so the site load fast, but had a hard time to add cache exception on for Woocommerce site with Nginx + FastCGI setup on Runcloud service being a paid member their since past 2 years but still their stack needs to be optimized for woocommerce + Nginx caching.

Hopefully someone has better ideas & can share their experience with litespeed for Woocommerce sites.

Thanks.
 
#2
Hi @cloudrider ,

Let me first start by answering your questions -

✓ Setting up LScache + CDN, do you use any page rules in Cloudflare
- During setup, I install Litespeed Cache, and If I am using Cloudflare, I make sure I've set its Browser and Edge Cache to highest possible since it will only store Static files by default, A simple page rule can be created to Increase Edge Cache TTL.

✓ Image/Font Optimization tips.
- Litespeed includes free Image Optimization which optimizes uploaded Images in their original form but also optimizes them in WebP format (Make sure you enable the options in Litespeed Cache Plugin). It also has a fallback for the browsers which do not support WebP, so you can still serve them optimized JPG/PNG.

✓ CSS / JavaScript Selective loading
- The Optimize tab contains everything you need to set up for CSS/Javascript Selective Loading, For CSS it also has a dedicated Cloud Critical CSS Generator, which helps your website to be very fast by decreasing the amount of data it has to load at once(it works only if CSS Async is enabled).

✓ Using any other optimizations plugins with LScache
- Never felt a need to use them.

✓ Do you use Redis cache or Memcached with LScache plugin?
- Memcached is not too powerful alone. On the other hand, Litespeed Memcached has options for persistent data, and I prefer that.

✓ Do you remove unnecessary CSS/ JavaScript from posts / pages.
- Basic Removal is taken care of by the plugin's Optimize Tab(Minification/CSS Async/JS Defer), But sometimes it requires a developer to remove a part which is not needed at all.

✓ Are you using quic cloud CDN & can this enable quic protocol with OLS.
- Yes and Yes, It is still in Beta as of now, but it does enable QUIC Protocol with all websites and speeds up the website as well :)


Apart from all this, I play around with the options inside the Litespeed Cache Plugin on each website to find out the best combination of settings for the website. Most of the times I end up with every Optimization feature working with proper exceptions setup inside the plugin itself, However, if you try this, Make sure you Purge the Cache after changing each setting to be sure if it is creating an issue. Enabling multiple options and then if you find any issue later, it is much harder to retrace the steps back.

Then there are several other steps such as checking the most accessed URL's by using AccessLog, to see if there is a page which is being hit and is not cached, or cache is being bypassed for some reason, Sometimes it is different Query Strings, sometimes it is just an invalid URL being hit with every page load, Once located those should be fixed. Apachetop is a good tool to do that, you might have to change OLS's Log format to NCSA Log Format to do that.

If it still remains slow, I just install an Application Monitor such as NewRelic to see what is wasting most of the server-time, and that solves the last part of the optimization.

Methods above do take a significant amount of time, but in the end, you'll come out with a much faster website, which would be able to handle an unbelievably good amount of visitors :)
 
#3
Thanks @Shivam ,

For taking time to reply, I am new to using LS cache plugin. When I use optimize tab settings to minify/combine CSS & JS it breaks the theme.

Do your recommend recommend using cloudflare page rules alongside LScache plugin to improve site load time.

Currently having load time of 5.37 s for 1.3MB page size which is slow while the site is hosted on Google cloud servers.
 
#4
Thanks @Shivam ,

For taking time to reply, I am new to using LS cache plugin. When I use optimize tab settings to minify/combine CSS & JS it breaks the theme.

Do your recommend recommend using cloudflare page rules alongside LScache plugin to improve site load time.

Currently having load time of 5.37 s for 1.3MB page size which is slow while the site is hosted on Google cloud servers.
You're most welcome :)


If your theme is breaking, its pretty normal, Its where everyone gets when they try to do this. The solution to it is as follows -
- Restore Litespeed Cache to Default Settings(There's a Reset All Settings Button), or just disable everything in the Optimize Tab.
- Make a list of your JS/CSS Files on the page which was breaking with JS/CSS Minification or Combine on.
- Turn back on the options, you disabled in the first step and in the Tab Next to Optimize, which is Excludes, Add the Half of your JS Files.
- Purge cache, and try to load the website.
- If it breaks, Exclude the other Half of your JS Files.
- If it gets solved by Excluding one half of the JS Files, Divide that half into two parts again and proceed until you find the JS File which should not be Minified or Combined.
- If JS is not the Culprit, Try with CSS.

This way you should be able to Optimize all other files, except for the one which is not meant to be Optimized, because some JS and CSS files are just poorly coded or conflict with the optimization, Its best to leave them as it is.

Regarding your second question related to Cloudflare, Yes I most definitely do, Litespeed Cache cache only Dynamic Data, but not static files, which is okay because serving static files from its actual location or from a cache location is pretty much the same thing, but when you use Cloudflare, It saves your static files on their edge and hence if nothing, saving your server's bandwidth for more important things.


Just Load time won't help me with that issue, Are you able to share your GTMetrix Report so that I can take a look at it?
 
#5
Hi @cloudrider ,

Then there are several other steps such as checking the most accessed URL's by using AccessLog, to see if there is a page which is being hit and is not cached, or cache is being bypassed for some reason, Sometimes it is different Query Strings, sometimes it is just an invalid URL being hit with every page load, Once located those should be fixed. Apachetop is a good tool to do that, you might have to change OLS's Log format to NCSA Log Format to do that.
Sorry for jumping in. How is the log format changed? I'm trying to get monitoring working but the log format isn't changing either through the WebAdmin Console or directly editing the files.
 
#6
Sorry for jumping in. How is the log format changed? I'm trying to get monitoring working but the log format isn't changing either through the WebAdmin Console or directly editing the files.
I think changing the LogFormat will work everywhere except DA with OLS as of now. Are you using Directadmin?
If not, what LogFormat are you putting in the Webadmin Console?
 
Top