π¬π§ Enable caching for Trellis
FastCGI caching
FastCGI caching, which is said to be a better choice than Varnish, is build in into Trellisβ configuration. Read more on the Trellis documentation website below π. FastCGI Caching | Trellis Documentation | Roots
Configuration
- Check which group_vars section you wish to edit, βproductionβ or βstagingβ.
- Open the
group_vars/production/wordpress_sites.yml
file (for production) - Add the following block
Note: the βskip_cache_uriβ is important here. It excludes permalinks from being cached. This is the starting point when you have issues with caching.
Provision the server
- From the
trellis/
folder run:
This provisions the server with the newly created cache settings.
Using caching with WooCommerce
Read this: https://roots.io/trellis/docs/fastcgi-caching/#woocommerce