WooCommerce powered WordPress website under nginx with both fastcgi and W3 Total cache?

I’m running a WooCommerce powered WordPress site under nginx with fastcgi cache. I’ve installed it with with EE command ee create example.com --wpfc. In order to tune it, I’ve simply followed the WooCommerce Window Shopping Caching Technique and the fastcgi_cache with conditional purging tutorials in order to optimize the caching and other aspects of the woocommerce shop.

After the ee installation I noticed the W3 Total cache plugin comes bundled with WordPress, so I activated it and started tuning it by following the following tutorial https://easyengine.io/wordpress-nginx/tutorials/single-site/w3-total-cache/

I was wondering if it is possible to have both fastcgi and W3 Total cache working together? If yes, would I get much more benefits when it comes to page caching and performance?


When you activate FCGI (using ee site update domain.com --wpfc) EE states exactly what you should do:

  • configure database and object caches to Memcached in W3TC;
  • disable page caching and browser caching in W3TC.

That’s it.

W3TC is used only for database and object caching, nothing else.

1 Like

Curious to know how performance compares between pure W3TC solution and FastCGI+W3TC…

I haven’t yet tested Easy Engine with FastCGI and W3TC for db and object caching. However, a lot of people say not to cache the database as it can actually decrease performance in some instances (from memory is only good for non SSD setups but can’t remember). Also prior to using EE every time I used object caching with W3TC is greatly slowed down the backend. Though I was using APCu not REDIS or Memcache.

Also maybe using REDIS and FastCGI and get rid of W3TC plugin all together. Use the recommended REDIS plugin.

I also would be interested in performance test all different scenarios. Haven’t had time myself to do this yet.

I personally have been using REDIS for everything but would like to give FastCGI a go with REDIS object caching.

Thanks for your input! Indeed the EE recommended settings for W3TC is a good starting point. However, it lacks some tips specifically for websites with WooCommerce plugin installed.

As long as I’m using Fastcgi + W3TC cache together, I expect the customer experience not to be ruined on my WooCommerce website, and that’s exactly what happened, even after following EE recommended settings for W3TC.

It turns out EE recommended settings does not mention anything about WooCommerce add to cart functionality being broken or having really bad issues with products not being added to the cart, cart empty issues etc.

I’ve overcome those issues after a lot of reading about W3TC, not a bad thing though as I could learn by trying to fix these issues myself.

I also created a doc https://docs.google.com/document/d/1WPleE22HeFSF6wunwqH6vvdy6F4lBsxbKtPNcGomYtQ/edit?usp=sharing with a few “self instructions” so I could remember the steps I had to take in order to have WooCommerce + W3TC working smoothly with Nginx + fastcgi_cache.

@rexi88 Thanks for sharing your considerations about FastCGI and W3TC.

I’ve managed to get a very high performance for a WooCommerce/WordPress powered website created with EasyEngine --wpfc (fastcgi_cache) + W3TC plugin installed/enabled, at least on the front-end.

On a 2GB SSD Digitalocean’s droplet, running the --wpfc (fastcgi_cache) alone makes WordPress backend blazingly fast, however, when W3TC is enabled the backend gets terribly slow.

I have no experience with REDIS, I’ll read more about it, but it seems to be worth it to give it a try with FastCGI.

Could you please point me out where I can find the REDIS recommended plugin? Does EE offer such set up as a creation command?

Hey there @qriouslad!

I’m running a WordPress/WooCommerce website create with EasyEngine --wpfc (fastcgi_cache) and I’ve managed to get a really high performance website having W3TC enabled. The only issue though is that when W3TC plugin is enabled, the WordPress backend gets terribly slow.

By the way, I’m using EE recommended settings for W3TC https://easyengine.io/wordpress-nginx/tutorials/single-site/w3-total-cache/ + some minor tweaks on my own, please see it here

Perhaps I’m missing something in order to make the WordPress backend more responsive. @rexi88 have mentioned that caching the database might decrease performance in some server instances. I’ll check this out somewhere else.

Anyway, W3TC allows object and page caching, which can really enhance the website’s performance in terms of caching, thus improving its loading time and all other benefits that comes with it.

Try disable Object caching in W3TC. That’s what slowed down my backend also. If that works then install REDIS plugin https://en-au.wordpress.org/plugins/redis-cache/

REDIS should work without changing EE confit I think. I haven’t had any issues with REDIS slowing down backend. If it did it’s no where near as bad as W3TC.

Just deactivate W3TC when using REDIS with FastCGI. The config in the server block is setup for FastCGI so I’m pretty sure REDIS works but if it doesn’t then it may need to be started or installed see https://easyengine.io/docs/commands/stack/ If you run multiple WP sites change the default setting in REDIS plugin to the domain name.

Let us no how you go.

Also forgot to answer your last question. Yes EE does allow you to setup a complete REDIS solution by using --redis rather than --wpfc. I have yet to test FastCGI. I asked around before I did anything and some people said they were getting better performance with redis. But this does depend on setup of server and wp site i guess. So test both.

I will definitely be giving FastCGI and REDIS object caching a go next I think.

I think the main difference between FasCGI and REDIS page caching is that REDIS caches using RAM and FastCGI uses SSD by default unless you change the server block to point to RAM location.

I will second swapping w3total cache out for redis. My woo sites work great with php7 and redis. I have never liked w3. I have been using redis with autoptimize plugin for for 8 months or so and it is working great.

1 Like