Caching plugins are hugely popular among our customers, but it’s equally common to misunderstand what they do—and more importantly, how they can cause issues on your WordPress site. So today, we’re answering the question “what is cache?”, why it’s important for your site, when you don’t need cache, and everything you need to know about caching plugins.
What is caching?
In short, caching means storing bits of information for future use, to speed up delivery. For your WordPress blog, this happens in two ways:
1. Your browser cache: Every web browser has a cache where it stores a small amount of data for sites you’ve recently visited. If you visit those sites again, your browser will pull from its cache rather than fetching new data, so it can deliver the site’s content faster.
2. Server-level caching and/or caching plugins: Some web hosts offer server-level caching, or you may opt to install a caching plugin. These work similarly on your site. WordPress dynamically generates pages through a coding language called PHP, which queries a database. These caching methods store the output in the cache and deliver those files to site visitors instead, saving the time it takes to run the typical database queries.
Generally, speeding up site delivery to your visitors is exactly what you want. But when you’re actively making updates to your site, particularly the design of your site, caching isn’t going to show you what’s happening on your site in real time.
Caching and making site updates
Here’s the number one thing to remember if you’re making site updates that don’t appear to be working or publishing:
If you have caching plugins, or any performance plugins, start by disabling those FIRST when things don’t work as expected.
And even with no caching plugins, you’ll still need to consider your browser cache.
Let’s talk about why.
How cache impacts design changes
One of the top files picked up by caching plugins AND your browser cache is your theme’s style.css file. This is where all of your site design styles are stored. When you make design changes, a caching plugin will continue to deliver your old style.css file, so you won’t see your new changes. That’s why it’s important to purge your cache in the plugin settings any time you make changes.
Additionally, you probably access your own site a lot, so your browser has saved a fair bit of data for your site in its cache, to speed up loading time. Even if you purge your plugin cache, you’ll still probably need to reset your browser cache. You can force your browser to fetch new data by holding the shift key and clicking the reload button in your browser. Remember, you access your own site more frequently than your readers, so their browser cache will naturally refresh from their normal browsing.
Be aware of any performance plugins in use, particularly for minifying files or serving images. Many of our customers use Autoptimize, which combines all of your sitewide styles into one stylesheet, speeding up delivery. However, since it pulls styling from plugins as well, you might update a plugin and not see an expected change. You’ll need to reset Autoptimize, as well as your caching plugin, to see changes. (Side note: Combining all JS files in Autoptimize can break theme and plugin functionality!)
Ultimately, even with purging your cache and resetting browser cache, you may find changes are still not showing. Sometimes, it just takes time for everything to reset, and you may need to temporarily deactivate caching and/or performance plugins if you want to check and make sure your changes have updated as you anticipated.
Caching plugin recommendations
Do I need a caching plugin at all?
If your web host has server-side caching, you probably do not need a caching plugin.
Caching plugins often conflict with server-side caching, and you’ll need to double-check with your web host before installing any caching plugins. WordPress managed hosts like Flywheel and WPEngine don’t allow caching plugins, as they have their own server-side caching. If you don’t have server-side caching, we recommend the plugin WP Super Cache.
Do I need more than one caching plugin?
NO. You only need one method of caching on your site, whether that’s server-side caching, or one caching plugin. Do not install and run multiple caching plugins at the same time.
Why? Because of how caching plugins work, running more than one can wreak havoc on your site. Once WordPress has dynamically generated a page on your site, the plugin keeps a copy of the static page to serve to your visitors. When you have more than one caching plugin installed, that static page could be generated from WordPress, or it could be a copy from another caching plugin. So let’s say your site goes down temporarily, then one caching plugin picks that up and serves it to the other. Your site’s actually back up, but your caching plugins are telling each other it’s not!
What about CDN?
Another thing to watch out for is loading images from a CDN. A CDN, or Content Delivery Network, stores your data on servers in multiple geographic locations and delivers content to the user from the server nearest to them, in order to speed up delivery time. If you serve your images from a CDN, or use the Jetpack plugin to speed up image load times (which is essentially a CDN), any changes you make may not be picked up by your caching plugin, resulting in missing images. You can temporarily turn off your CDN or Jetpack setting to resolve the issue.
We hope that this post was informative and helpful! Are there any other tech issues you want to know more about? Let us know in the comments below!