When updating content on your site, you might not see your changes reflected immediately when viewing the site. The reason for this is most commonly caching. Heavy caching is one of the best ways to speed up your browsing experience. The primary caching layers that may cause issues with content not updating are server and local caching. Typically seeing your changes is as easy as purging both caches.
WP Engine Caching
Our servers employ heavy caching by default. This is part of what makes WP Engine the fastest WordPress website host. When using page caching, the typical flow for the first page request looks something like this:
Many of these steps are saved when you introduce a cached version:
Each layer of caching has its own default expiration times as well.
Page Cache — Stores the dynamically generated version of a page
- 10 minute expiration
CDN Cache — Stores static assets on various global servers
- 24 hour expiration
Object Cache — Stores results of queries
- 1MB Buffer
Local Cache — While we do not directly control this cache, it will impact how you see the site
- Default expiration varies by browser and operating system
- Cache expiration can be adjusted through cache headers
Cache headers are rules that tell pages and assets how long to cache items locally. This means purging cache impacted by these headers can only be done from each local machine the item is cached on.
Cache-control headers cannot be set lower than 600 – anything lower requires a full cache exclusion rule.
If you want to increase cache expiration on your site to help improve performance/scalability, there are a couple methods of doing this:
- Use WP Engine Advanced Cache plugin
- Extend Cache Expiration in .htaccess
- Extend Cache Expiration in Nginx (must contact Support)
Cache headers on static assets can only be adjusted through Nginx. This is true for any header set on a static asset.
There are situations when a page should never be served from cache and the interaction should always be treated as unique, such as during checkout or login. Our servers will respect cache exclusion rules for pages, cookies and arguments.
Certain pages are excluded from server caching by default on all sites to help ensure functionality. Some of these default cache exclusions are:
- Legacy staging environment
- WP Admin area
- Pages named “cart”, “checkout”, or “check-out”
- Pages where a cookie containing “wordpress_” has a value set
If we see WooCommerce on the site we add some extra default exclusions, so you don’t have to worry. We exclude the following pages for WooCommerce sites:
As well as the arguments:
And finally, these cookies:
While we’d added some default exclusions there are still situations you may need custom cache exclusions put in place.
If you’re having issues with a form not submitting, or use a custom checkout URL, you may need to reach out to our support team to have that page excluded from server caching on your site.
At times a plugin or theme may not be carrying data correctly from page to page. If this happens there may need to be a cookie or arg excluded from caching.
NOTE: Caching cannot be fully disabled on your website, or on your website’s homepage, as this will negatively impact your site’s performance.
Partial caching of a page is not possible- a page will either be served from cache, or the page will be generated fresh every time.
When setting cache exclusions, you should be as specific as possible. Too many pages excluded from cache by a cache exclusion rule will impact performance. We reserve the right to remove cache exclusion that are negatively impacting server performance.
NOTE: Nothing can be excluded from object cache.
Purge Server Caches
Extensive caching can complicate things if you’re working on your site and expecting to see changes immediately on the frontend. To purge all server caches (page cache, CDN cache, object cache):
- Login to your website’s wp-admin dashboard
- Click on the WP Engine plugin tab
- Scroll down, click Purge All Caches
An alternate method is available if you cannot access your wp-admin area. This is not the recommended method typically, as it purges only the server page cache.
- Login to the User Portal
- Click Sites
- Click the environment name
- Click Utilities
- Click Purge Cache
Purge Browser Cache
Your browser may cache items such as: css styles, cookies and sessions, auth boxes, DNS/IP Addresses, and permalinks. Browser cache generally respects the cache-control headers sent back with the request from the web server.
Meaning if someone requests the /about-me/ page on your site and it has a cache-control time of 10 minutes/600 seconds, the page is not only cached on our server, it’s also cached in the browser for that amount of time.
For static assets, which have long-cache expiration times (images, css, etc), this means the browser will also cache them for the time specified by the server when sending the request back (30 days is default on WP Engine).
Most browsers respect ctrl + F5 for a hard-refresh, which reloads the page and ignores any existing browser cache.
NOTE: Browser cache can only be purged for your own machine. There is no way to force other visitors to purge their browser cache.
Still Not Seeing Your Changes?
- Check your site for caching or compression plugins and purge its cache.
- Are you using Cloudflare? Login and purge all caches. We also suggest installing the Cloudflare plugin.
- Are you using a firewall service, like Sucuri? Login to their portal and purge caches.
- Are you using a highly customized .htaccess? Try using a default .htaccess file
- Check the page in a proxy, like GeoPeeker or kproxy, to see how it looks in other locations.
- If the changes show, then you’ll need to purge local caches again.
- If the changes do not show, try purging server caches again.
- DNS caching could be at play as well. This easiest way to purge this is by restarting your computer or device. Otherwise you can try flushing your DNS manually.
If you’re still not seeing your updated content, just open a Live Chat (available 24/7) with our Support Team from within your User Portal, and we are glad to help out further.
If you’d like to see an updated version of a specific page, but don’t want to clear server cache for their whole site, you can manually “bust cache” locally, by adding an argument onto the end of the URL.
EX: To see a newly generated version of http://somedomain.com/updated-page/ you could go to http://somedomain.com/updated-page/?somearg1 to force the page to be generated new from the server.
Once it’s loaded, the URL is cached on the server again. Meaning simply reloading the URL will show the same cached version. If you want a new version each time you must change the arg value each reload:
This will only address WP Engine server cache because our server sees the change in URL as a completely different page. Your local browser, caching plugins, and some firewall or proxy service could still see this as the same page and serve from their cache.
A curl can tell you quite a bit about where the URL may be getting cached. You can curl from your terminal or with a tool like Online Curl.
This page is cached but it is the first time it’s been generated by the server, so it is not served from cache:
This page is cached and this version is served from cache:
This page is not cached by the WP Engine servers: