Convesio + WordPress W3 Total Cache
Learn how Convesio uses W3 Total Cache and other caching solutions to help WordPress scale.
TECHNOLOGY
Edge Caching with CloudFlare Enterprise
Edge Caching refers to using a Content Delivery Network (CDN), such as Cloudflare, to cache your assets and in some cases the entire HTML of your page. The default way most CDNs work is to cache static assets like images, CSS, and JavaScript files.
Convesio is integrated with Cloudflare Enterprise at the platform level. This means that your site is hosted through an Enterprise Cloudflare zone and receives all the enterprise features we have enabled, including enhanced security and full page caching.
Serving your full site content from the edge – and not just images and scripts – allows for much faster load times for audiences around the globe. It also reduces load on the server by serving the entire page of content from Cloudflare’s edge. This saves your server resources for the requests that can’t be cached, like logging in users, carts, and checkouts.
In addition to full page edge caching, we also minify CSS and HTML on the edge. For compatibility reasons, we do not minify JavaScript files.
SERVER CACHING
Server-Based Caching
In addition to Cloudflare, Convesio also provides server-based caching in the Load Balancer in our platform. This caching is full page NGINX caching, which is another level of caching that reduces load to your WordPress and Database computational resources.
WORDPRESS
Built-In Optimizations for WordPress
Both Convesio’s caching and Cloudflare have preconfigured features to allow WordPress and WooCommerce to work out of the box. Below is an example of several of the features automatically configured with each site.
- Respect for no-cache headers
- Automatically break cache when a user logs in to WordPress
- Automatically break cache when a user adds an item to the cart
- Bypass edge caching and optimization on the /wp-admin/ folder
- Bypass cache when certain cookies are detected.
Object Caching
Redis and Object Cache Pro
In addition to all these page caching options, we also include Object Caching powered by Redis with Relay and Object Cache Pro. Object Caching is a cache stored in RAM, so it is very fast and efficient.
Caching Options
Object Caching vs. Database Caching
Many people confuse object caching and database caching. Database Caching typically refers to caching queries occurring frequently in the database. Object caching on the other hand refers to anything that is an object in code. These objects can contain database queries, but are not limited to only optimizing the database. While object caching can improve the performance of certain database operations, it also will improve the overall performance of WordPress, as it is not limited to database improvements.
For object caching to work, there are three separate components needed:
- Database – For this, we use Redis. This is a separate database from WordPress’s MySQL or MariaDB database
- Object Cache Pro – This is a WordPress plugin that is included with Convesio and allows WordPress to utilize Redis
- Relay or PHPRedis – This is installed on your underlying site’s server and it enables Redis to operate at the PHP level. Historically, the default has been PHPRedis, but we use something called Relay. This is a PHP Module that functions like PHP Redis, but is higher performance and designed to work in a distributed cluster environment
Some of the benefits of using Redis with WordPress include:
- Better WordPress admin (/wp-admin) performance
- Faster page load times
- Lower database and WordPress CPU load
- Faster database queries and response times
Enhanced Optimization with W3 Total Cache
Even with these solutions, W3 Total Cache provides even more speed and performance improvements. With all these layers of caching, using a WordPress specific plugin can provide much more targeted control. Here are some reasons you should consider using W3 Total Cache, in addition to Convesio’s platform caching:
- Browser cache optimization
- Fragment Caching
- Database Query Caching
- JS, CSS, HTML optimization
Configuring W3 Total Cache on a WooCommerce Site
This step-by-step guide will walk you through configuring W3 Total Cache on a WooCommerce site:
Step 1: Install and activate W3 Total Cache
- Log in to your WordPress admin dashboard
- Go to Plugins > Add New
- Search for “W3 Total Cache” and click Install Now on the plugin
- After the installation is complete, click Activate
Step 2: General settings
- Go to Performance > General Settings in your WordPress admin dashboard.
- Enable the following options:
- Page Cache: This caches static HTML pages to reduce server load and response time
- Minify: This compresses CSS, JavaScript, and HTML files, reducing file sizes and improving load times.
- Database Cache: This caches database queries, reducing the load on your server
- Browser Cache: This caches static resources on the visitor’s browser, reducing server load and improving load times
Step 3: Page Cache settings
- Go to Performance > Page Cache
- Set Cache Front Page to Enable
- Set Cache Feeds to Enable
- Set Cache SSL (https) requests to Enable
- Set Cache URIs with query string variables to Disable
- Scroll down to the Advanced section and add the following pages to the “Never cache the following pages” field, separated by line breaks:
- /cart/*
- /checkout/*
- /my-account/*
- Save the changes.
Step 4: Database Cache Changes
- Go to Performance > Database Cache
- Set Cache Timeout to a reasonable value (e.g., 180 seconds).
- Save the changes.
Step 5: Browser Cache settings
- Go to Performance > Browser Cache
- Enable Set Last-Modified header, Set expires header, Set cache control header, and Set entity tag (ETag)
- Save the changes
Congratulations! You have successfully configured W3 Total Cache for your WooCommerce site hosted on Convesio.
Convesio Caching Plugin
Each Convesio site should be running the Convesio Caching plugin. This adds functionality that will integrate and synchronize the cache purge requests. With the Convesio Caching plugin, when a Cache purge is triggered, we automatically purge the server and edge caches. Our caching plugin also works directly with W3 Total Cache, so when the cache is purged in W3 Total Cache, we automatically purge our server and the Cloudflare edge cache.
Test Your Site’s Performance
- Visit your WooCommerce website and navigate through different pages to ensure everything is working correctly.
- Use tools like GTmetrix, Pingdom, or Google PageSpeed Insights to test your site’s performance and ensure improvements have been made.
Try Convesio
Scalable WordPress Hosting
More performance, scalability, security, and peace of mind = more happy customers.
- 7-day free trial
- Free white glove migration
- No downtime or data loss