Do you want to learn about WooCommerce caching and how to use it in your store?
With the increasing complexity of online transactions and attempts to customize the WooCommerce store, your website can face significant speed-related issues.
Ideally, it’s best to cache your website content for maximum performance.
But, it is not at all recommended to cache the WooCommerce website. There is enough dependency on user sessions and the need to dynamically load content, such as updates related to cart items or product stock.
Performing aggressive caching in WooCommerce affects your store performance, such as product prices getting incorrectly displayed, payment transactions not going through, etc.
You’d have to be mindful about caching different elements of your WooCommerce website to ensure everything on your store works smoothly.
And that’s exactly why we’re here to help.
In this article, we’ll help you understand everything about WooCommerce caching and how you can implement it in your online store.
By the end of this post, you’ll be able to ensure your online store delivers a fast and secure shopping experience to build trust with your customers.
If you want to enhance your store's conversions and grow your WooCommerce business, FunnelKit is here for you — hit the button below to find out more!
Contents
Caching, in simple terms, involves storing frequently accessed website data temporarily to reduce load time, allowing the end-user to load the website faster.
This cache consists of high-speed data storage that enables quick data retrieval when customers access your online store.
If a website has been cached, its assets can be served quicker than if a website has to load pages each time it’s requested.
This ensures swift data retrieval, boosting load speed and enhancing user experience in your store.
There are two main types of caching:
1. Full-page caching
Full-page caching refers to caching the entire website’s HTML output.
When a user visits your website, the server can quickly deliver the cached copy instead of processing each file individually.
2. Object caching
Object caching involves storing frequently accessed objects, such as database queries or API requests, in memory to speed up your website.
Many businesses use caching systems and tools like Memcached and Redis to implement WooCommerce object caching.
These tools provide a fast and efficient way to store and retrieve data in memory.
Let’s look at different sources of caching:
By default, many caching plugins don’t cache logged-in users.
But even if you do cache logged-in users, your WooCommerce website can face some serious issues on desktop and mobile, such as:
As a store owner, you must ensure that your online store is secure and adheres to all legal compliances.
For that, it’s essential to set up WooCommerce caching correctly in your store.
The first step towards it is to exclude specific pages from the cache to avoid any issues or discrepancies in your WooCommerce store.
This is exactly what we’ve covered in the next section.
As discussed above, caching your WooCommerce website may cause several functionality issues affecting conversions in your store.
To avoid such scenarios, it’s crucial to exclude certain dynamic pages of your WooCommerce store.
Here is the list of WooCommerce pages that need exclusion from caching:
These are the primary dynamic pages where the content changes based on user preferences.
In addition, WooCommerce has a DONOTCACHEPAGE constant that you can use to manually exclude specific pages from caching.
But you can use a reliable plugin compatible with WooCommerce to make things easier.
Exclude the WooCommerce session identifier _wc_session from caching.
_wc_session holds all the details of your customers’ carts and their shipping-related information. Caching it could cause issues like showing the wrong cart items and incorrect billing or shipping details.
Some of the best WooCommerce cache plugins already exclude various query stems, including the _wc_session.
There are four WooCommerce cookies that you should exclude from your cache:
For more information, check out the official WooCommerce documentation.
FunnelKit Funnel Builder powers 20,000+ WooCommerce stores. Users have been using it to create high-converting checkout pages and upsell offers to generate more revenue than ever.
You can use it to customize your checkout pages and include all the high-converting elements to drive conversions.
It's the best all-in-one WooCommerce checkout manager tool to have in your store.
You can even offer order bumps and one-click upsells to boost the average order value in your WooCommerce store.
To ensure smooth operation, we recommend excluding pages created with FunnelKit Checkout or Upsells from your store.
In the section below, we will demonstrate how to exclude FunnelKit Checkout and Upsells from different caching plugins.
Make sure to copy the permalink slugs of checkout and upsell pages from the Funnel Builder's global settings.
Let’s explore.
Find the step-by-step process of excluding the checkout and upsell pages from caching with different WordPress plugins.
Go to the WP Rocket settings.
Next, hit the ‘Advanced Rules’ section and paste the permalink slugs there.
Once done, click on the ‘Save Changes’ button at the bottom.
Well done! You have successfully excluded FunnelKit Checkout and Upsell pages from caching using the WP Rocket plugin.
Open the settings of WP Super Cache and go to the ‘Advanced’ tab.
Scroll down to the ‘Rejected URL Strings’ section and paste the FunnelKit Checkout and Upsell permalink slugs.
Make sure to hit the ‘Save Strings’ button when done.
That’s it! This is how you can exclude the URL strings from caching using WP Super Cache.
Go to settings of W3 Total Cache and click on ‘Page Cache’.
Scroll down to the ‘Never cache the following pages’ settings.
Paste the permalink slugs of the FunnelKit Checkout and Upsell pages there with /checkout* and /offer*.
Once done, hit the ‘Save Settings’ button.
This will exclude all the FunnelKit Checkout and Upsell pages from caching.
Click on the WP Fastest Cache on your WordPress menu.
Go to the ‘Exclude’ tab and hit the ‘Add New Rule’ button.
Choose ‘Contains’ from the drop-down and paste the checkout permalink slug there.
Click on ‘Save’ when done.
Similarly, do it with the FunnelKit Upsell permalink slug and save it.
These are the final settings you saved.
This will exclude all the FunnelKit Checkout and Upsell pages from caching with the WP Fastest Cache plugin.
Navigate to Settings ⇨ LiteSpeed Cache from the WordPress menu and click on the 'Excludes' section.
Paste the FunnelKit Checkout and Upsell URLs.
Make sure to hit the 'Save Changes' button to lock your changes.
This will exclude all the FunnelKit Checkout and Upsell pages from caching with the LiteSpeed Cache plugin.
Breeze is a WordPress cache plugin.
Navigate to Settings ⇨ Breeze from the WordPress menu and click on the ‘Advanced Options’ section.
Paste the FunnelKit Checkout and Upsell URLs using the wildcard.
Hit the ‘Save Changes’ once done.
This way, you’ll be able to exclude the FunnelKit checkout and Upsell page URLs from caching using the Breeze plugin by Cloudways.
Go to the Settings of CDN Enabler.
Paste the checkout and upsell page URLs into the ‘CDN Exclusions’ field, followed by the wildcard.
Once done, hit the ‘Save Changes’ button.
Log in to your Cloudflare account and go to the ‘Page Rules’ section.
Next, click on the ‘Create Page Rule’ button.
Paste the FunnelKit Checkout and Upsell page URL there.
Next, choose ‘Cache Level’ and choose ‘Bypass’ as the cache level.
Make sure to hit the ‘Save and Deploy Page Rule’ button.
Then create the same page rule for the FunnelKit Upsell page URL; this is how you can exclude the checkout and upsell page URLs from caching in Cloudflare.
Similarly, you can send an email or raise a support ticket with your hosting providers to exclude the checkout and upsell pages from caching.
You can write this email prompt:
Hi!
My site runs the custom checkout pages by FunnelKit and we want to exclude checkout pages from caching. The FunnelKit support team has instructed us to ask you to place a cache exception on our checkout and upsell pages.
Could you please add the URLs which follow this pattern to the exception list?
http://YOURSITE.com/{put your checkout page URL here}
http://YOURSITE.com/{put your upsell page URL here}
Thanks!
Their support team will help you with URL exclusion in no time.
Once you’ve configured your caching plugins for WooCommerce, it’s time to test everything works fine on the front end.
First, open the incognito mode of your web browser and test these things in your online store.
Product pages
Go to your store and make sure to test the following:
Checkout functionality for guest and existing customers
Add a product to your shopping cart and proceed to checkout as a guest customer. Make sure to test the following:
Once done, repeat the same steps after you log in to your store as an existing customer.
WooCommerce coupons
Create a WooCommerce discount coupon and apply it to the coupon section on the checkout page. Ensure the following:
My accounts page
Go to the ‘My Account’ page and reset your account’s password. Log out of your account and log in again with the new credentials to ensure it works properly.
Well done! These are a few things you can do to test your WooCommerce store after caching.
Let’s look at some troubleshooting and tips for effective WooCommerce caching.
Many cache plugins don’t cache the WordPress admin area to ensure that real-time changes can be made without interfering with cached versions.
So, when they test their flow from the product page to the checkout page to the thank you page, it seems everything works fine.
However, this is not the correct way to test your website after setting up WooCommerce caching.
Your customers or visitors may encounter certain issues that we talked about in this post, such as product prices getting incorrectly displayed, WooCommerce cart cache issue, payment transactions not going through, etc.
That’s where the incognito mode of your web browser really helps.
Using the incognito mode allows you to view the front end of your website as a regular user, ensuring the changes are indeed taking effect, and everything is working smoothly (including the page loads, dynamic information displaying correctly, and transactions effectively processing through).
The most probable reason why you see everything works on desktop and not on other devices is because you are logged in as admin.
Logged in users are never served cache. And when you check the process on other device, it gives you errors.
This is why after implementing exclusions related to WooCommerce caching, you need to check your store checkout process using different devices in non-logged-in mode.
It'll help you resolve your issues and streamline your store checkout process.
Choosing the right WordPress caching plugin for WooCommerce is crucial for optimizing your store’s performance.
There are different caching plugins, such as WP Rocket, WP Super Cache, W3 Total Cache, and WP Fastest Cache, and built-in cache plugins from hosting companies, including SiteGround, WP Engine, Bluehost, etc.
Make sure to consider different factors when selecting the best cache plugin for WooCommerce:
The effectiveness of a caching plugin also depends on your specific hosting environment.
Thus, it’s essential to consider the recommendations of your hosting provider and your store’s requirements when choosing.
In WooCommerce, it’s crucial to display real-time information. Certain elements, such as product prices, availability, cart details, etc., change dynamically.
Even if you exclude certain WooCommerce pages and cookies, your browser may still load a cached version of the page that displays outdated information.
This is why you should clear your browser cache and try loading your website in the incognito browser session.
Access your browser settings and navigate to the Privacy page to clear the cached data.
It’s important to check the updates of your caching plugin on your WordPress dashboard.
Developers regularly release certain updates to fix bugs, improve performance, and ensure compatibility with the latest versions of WordPress and other plugins.
Also, ensure that your plugins don’t show any conflicting warnings because they can impact the functionality of your caching setup.
If there is a conflict, deactivate the plugin from your WordPress menu and contact the plugin team to solve the issue.
Enable WooCommerce to debug logging after you’ve set up caching in your store. This helps you have general PHP and WordPress warnings, error messages, and status information.
To enable debug logging, check out the official Woo documentation.
Plus, you can check the error logs by navigating to WooCommerce ⇨ Status and on the Logs section.
These logs can often provide valuable information about the reason for caching issues on your store.
If you face any issues, feel free to contact our Support Team, and we'll help you out.
The size of your WooCommerce store or WordPress website’s code can impact its speed and functionality. That’s where minification comes into play.
Minification involves removing unnecessary characters, such as whitespaces and comments, from your website’s HTML, CSS, and JavaScript files.
This makes it easier for browsers to parse and deliver results quickly.
WooCommerce does not recommend minifying the JavaScript. But it can help improve the performance of your online store.
Our experts suggest that you minify JavaScript on your website but exclude WooCommerce scripts from this process.
It’s important to avoid minification on checkouts and upsells.
As a WooCommerce store owner, it’s critical that you ensure that your WooCommerce website delivers the best shopping experience to your customers.
This includes correctly configuring WooCommerce caching in your online store.
We hope you’ve understood why aggressive caching leads to issues in your WooCommerce store and the importance of excluding dynamic content.
We’ve also demonstrated the exclusion process if you use FunnelKit Checkout and Upsells to transform your store’s shopping experience.
This guide is more than enough to keep you in a good position to take the next steps.
Also, if you’re not a FunnelKit user yet, you’re missing out on the opportunity to enhance your store’s conversions and make big sales!
So why wait?