One issue that is notorious for causing issues with WordPress websites is caching. Many hosts offer content delivery networks (CDN’s) or server side caching, and can cause havoc on a shopping cart system.
What is Caching?
Caching is a way to speed up a website delivery by preparing, compressing, and having a stored copy of the content the customer is requesting. In many cases, this is a good thing, but sometimes in a dynamic shopping cart situation, we do not always want caching.
Caching can come from various sources:
- Web Hosts can implement server side caching which you may or may not be able to control. Your website may be fast, but with eCommerce, the data may get messed up.
- WordPress Plugins often are installed, sometimes multiple plugins, that will minify, cache, and try to boost performance but ultimately cause trouble in WordPress eCommerce.
- WordPress Themes have started to use caching and implement their own speed boosting techniques, but can again lead to caching and data trouble in dynamic sites.
How to know if you have a Caching issue?
There are many common signs that you have caching issues.
- Users add items to their shopping cart and are not able to delete or update their cart items.
- Users add items to their shopping cart and see randomly other items in their shopping cart.
- Users begin checking out and see other user data… this is an obvious sign as caching of database calls and cookies is present.
- Users checkout but cross data with another user account.
- Changes are made to a product such as titles, descriptions, prices but when you view the front end, it is old data… only thing it can be is caching.
Is Caching a security risk?
Yes, we like to think so… because you are the owner and WordPress developer on your website, and you alone control all the coding, plugins, themes, and mixed data on your site, it is critical you understand what each and every plugin, theme, and piece of data is doing. While we can control our plugin, the WordPress platform is a very fluid area and every plugin and change injects coding from sources all around the world, therefore they can all behave differently in mixed environments. What plugin A does may have an effect on what plugin B and plugin C do. What Theme A does, will affect what plugin B and plugin C experience.
For this reason, we can only recommend that known and trusted plugins with reputable support and followers be installed in WordPress. We like to minimize plugins, thereby minimizing coding conflicts.
How to Solve Caching Issues
This is what everyone wants to know… you identify that you have a caching issue, now how do you solve it in real world situations. Plugin developers blame hosting and other plugins, hosting companies blame plugin developers, everyone blames everyone else about the issue, but solving the problem can be a confusing process to most users.
Here is what we typically do:
- First off, we go to WP EasyCart -> Settings -> Checkout and make sure “Prevent Cart Caching” option is turned ON. This will load the cart and account using best techniques as best we can. Remember, it still depends on every other plugin and theme coder to have a happy system, so while this tries it’s best to load correctly, it can be overwritten by others. If problem still persists, move to step 2.
- Next easiest step, look in your plugins and deactivate all caching plugins. In fact, deactivate all plugins except EasyCart, see if the problem resolves itself. If so, enable each one at a time until you find out what plugin is causing the caching behavior you see. If this doesn’t work, move to step 3.
- If no plugins cause the caching issue, then look at your theme, switch to a simple twenty-twenty stock WordPress theme. Does the caching behavior exist or not, if so, contact the theme developer and see if they have ways to disable caching. If this doesn’t work, move to step 4.
- Contact your web host provider. Server side caching is not something you would recognize right away. It works great on static sites, but eCommerce programs by any company will struggle with server side caching. Ask your web host to turn off all caching systems. If that is not possible, and some may not do that, then ask them to add exclusions to the store, cart, and account pages in your WordPress. If the problem persists, it may be time to find a more non-cache friendly host.
In the end, caching can be hard to replicate. Some days it may seem to store old data, then it may work fine. The key is that you cover your basis with the 4 tips above and eliminate the most obvious caching mistakes. Worst case scenario, you need to move to a more non-caching host provider.
Are there ways to Cache successfully?
Yes, we have had good luck with caching and eCommerce. Here are a few things we like to follow and use.
- We like to stay away from SiteGround or GoDaddy just because they do tend to cache heavily. If starting with a fresh hosting platform, might jump toward BlueHost or WP Engine which are a couple of our favorites. We have many users on all these platforms, it’s just a recommendation if starting fresh.
- Many hosts like WP Engine will gladly add exceptions to any caching server side, just chat with them and ask they exclude the store, cart, and account. They are starting to do this automatically nowadays.
- Make sure you only use one caching plugin. We have seen sites with 6 caching plugins running… don’t be that guy.
- WP Super Cache works great with just default settings.
- WP Rocket is blazing fast, again, just use default settings, don’t go crazy with custom settings without knowing exactly how they affect all code from all plugins.
If you are developing a WordPress, caching can be very frustrating as you make changes and do not see them instantly… this means it’s caching somewhere. EasyCart changes should be instant, so if not, you know you have a caching issue.
Are there Caching solutions to avoid?
Yes, we have found server side caching is good for static websites, but a dynamic shopping system it can cause issues with. Try to avoid using CloudFlare or other server/hosting based solutions to cache.
Firewall and security software can also cause issues. We have noticed GoDaddy is notorious for having caching systems running on their servers and often refuse to turn them off. GoDaddy also offers firewall caching which is hard to detect but can be disabled. You may have to hunt for it on this hosting platform or search through your products and settings in order to disable it.