ISSUE: Changes I make in the Customizer are not appearing on my live site
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 PERFORMANCE PLUGINS ACTIVATED, START BY DISABLING THOSE FIRST WHEN THINGS DON’T WORK AS EXPECTED. THEN, CLEAR YOUR BROWSER CACHE.
This Help Desk article will go over why these two steps are so important when you are customizing your site, and how to implement them.
WHAT IS CACHE AND 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:
- 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.
- 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.
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 when you load your site in a browser, 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, OR turn the plugin off completely while you are making design 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 probably need to reset your browser cache.
HOW DO I KNOW IF I HAVE A CACHING PLUGIN ACTIVE, AND WHAT SHOULD I DO IF I'M USING ONE?
You can audit all plugins you have installed and/or activated by navigating to the Plugins tab from your WordPress Dashboard. Common caching and performance plugins we see our customers using include:
- W3 Total Cache
- WP Super Cache
- WP Rocket
- LiteSpeed Cache
- Simple Cache
- WP Optimize
- SG Optimizer (common if you host through SiteGround)
What you should do: If you have one of these plugins active, at the very least, we recommend clearing cache on it via the plugin settings while you make changes to your site. But ideally, we strongly recommend disabling the plugin completely while you customize, so you are seeing the most up to date version of your stylesheet. If you temporarily deactivate the plugin, don't forget to clear your browser cache using the instructions below, to flush cache there too.
I DON'T HAVE A CACHING PLUGIN. HOW DO I KNOW IF MY SERVER IS CACHING MY SITE, AND WHAT SHOULD I DO IF THEY ARE?
Many hosting companies will provide a plugin or other settings directly from your Dashboard to control cache. Look for any tabs or plugins that relate to the name of your hosting company (for example, SiteGround offers a caching plugin called SG Optimizer; Bluehost usually places a tab related to cache along the top of the WordPress menu bar when you are logged in).
Commonly used hosting companies which will implement server-level cache include:
- Many "Managed WordPress" hosting plans — if you're not sure, check with your provider and ask if they feature cache controls from your WordPress dashboard, or server dashboard.
What you should do: Once you find settings for your hosting company's caching, look for options to "purge all cache." You may also be able to change the settings so that the cache isn't as aggressive, and will pick up your changes sooner. Alternatively, opt to turn off server-level cache while you're making changes, to avoid the issue altogether.
I HAVE BOTH A CACHING PLUGIN AND SERVER CACHING. CAN I JUST TURN OFF ONE?
Having more than one caching method will wreak havoc on your site, especially when making design updates. 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. If you have been running more than one, pick the one that you prefer, and disable/delete the other. You should disable your preferred method while you make changes, then turn it back on once you're finished.
Why use only ONE caching method? Because of how caching work, running more than method one can wreak havoc on your site. Once WordPress has dynamically generated a page on your site, the plugin (or your server) keeps a copy of the static page to serve to your visitors. When you have more than one caching method 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!
This often accounts for why changes made to a site revert back to old versions, or just look totally wrong. With multiple caching methods, you're caching your cache and the correct version of the site stylesheet cannot load.
HOW DO I PURGE MY WEB BROWSER CACHE?
You can force your browser to fetch new data by holding the shift key and simultaneously 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.
- For more on caching, including whether you even need it, plus information about Content Delivery Networks, be sure to check out our blog post here.