Server Caching
At Kinsta, we implement and manage server caching (aka full-page caching) for all sites server-side. This means there is no need for typical caching plugins.
By default, the cache expires every 24 hours; you can change the expiration time, and you can manually clear the cache. If you manually clear the cache either in MyKinsta, through the WordPress dashboard, or using WP-CLI, it is limited to 1 request every 10 seconds.
For more details, please take a look at our detailed post on the topic: Kinsta Handles WordPress Caching So You Don’t Have To.
Server Cache Expiration
The cache is set to expire every 24 hours by default, but you can adjust this to be longer if needed. To change the cache expiration:
- Go to MyKinsta > WordPress Sites > sitename > Caching > Server Caching.
Change the server cache expiration time in the Caching tab. - Select Change cache expiration, in the modal/pop-up that appears, select your desired cache expiration, and click Change expiration.
Choose the cache expiration time for your environment.
This changes the server cache and edge cache expiration. For sites that don’t often change, having a longer cache expiration can be beneficial for performance.
Clear Cache in MyKinsta
In MyKinsta, you can clear the server, CDN, and Edge Cache for one or multiple sites, including staging sites, simultaneously from the WordPress Sites page. This also clears the Redis object cache if you’ve added the Redis addon to your site.
Select the checkboxes next to the site(s) you want to clear the cache for, click Actions, and choose Clear cache.
![Select which environments you want to clear the cache for.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fwordpress-bulk-action-clear-cache.png&w=3840&q=75)
Select the types of cache you want to clear and click Clear cache.
![Select the types of cache you want to clear.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2024%2F03%2Fwordpress-sites-bulk-clear-cache-1024x372.png&w=2048&q=75)
Once the process is complete, a success message will appear.
You can also clear the server cache for a single site within WordPress Sites > sitename > Caching > Server Caching > Clear cache. This also clears the Edge Cache if Edge Caching is enabled and the Redis object cache if you’ve added the Redis addon to your site. However, it does not clear the CDN cache, which provides an additional layer of caching for static assets (e.g. images, CSS files, JavaScript files); this needs to be cleared separately within WordPress Sites > sitename > Caching > CDN > Clear CDN cache.
![Clear the server cache on the Caching tab in MyKinsta.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fwordpress-clear-server-cache.png&w=3840&q=75)
Clear Cache in Your WordPress Dashboard
The Kinsta Must Use (MU) plugin is installed by default on all Kinsta-hosted sites. This is not your typical caching plugin, as it works on a server level. It allows you to purge the cache right from the admin bar, including:
- All cache.
- Server cache (aka full-page cache).
- Object cache.
- CDN cache.
You can also control automatic purge settings when posts and comments are published or updated.
To manage or clear your server cache, login to your WordPress dashboard.
If you need to clear the cache for the entire site, click the Clear Cache link in the admin toolbar near the upper right corner of the page.
![Clear cache from your WordPress dashboard with the Kinsta MU plugin.](https://kinsta.com/_next/image/?url=https%3A%2F%2Fkinsta.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fwordpress-muplugin-clear-caches.png&w=3840&q=75)
To configure automatic purge settings (automatically clear the cache for specific URLs or paths when you make changes to your site), you can configure those URLs in the Kinsta MU Plugin Settings.
Click Kinsta Cache in the left sidebar and add the URLs you want to purge when updates are made. For more information, check out our guide on Adding Custom Caching URLs in the Kinsta MU plugin.
- When Edge Caching is enabled on your site, clearing the cache with the Kinsta MU plugin also clears the Edge Cache.
- When Kinsta’s CDN is enabled, clearing the cache with the Kinsta MU plugin also clears the CDN cache.
Clear Cache With WP-CLI
Connect to your server with SSH and navigate to your site’s document root:
cd public
If the Kinsta Must Use (MU) Plugin is installed on the site, you can clear the site cache and the edge cache (when Edge Caching is enabled) with this command:
wp kinsta cache purge
If you want to clear the CDN cache, you can use the following command:
wp kinsta cache purge --cdn
If you only want to clear the site cache without clearing the edge cache, add the --site
flag:
wp kinsta cache purge --site
To clear all cache, add the --all
flag:
wp kinsta cache purge --all
Exit SSH with the following command:
quit