Caching

Caching is an important part of optimizing your WordPress website, and we make it easy at Kinsta. Check out our guides on site caching (aka full-page caching), edge caching, and Redis caching to learn more about each type of caching.

Clearing Cache

Note: If your theme or an active plugin on your site has built-in caching, that cache is managed separately from the caching implemented by Kinsta. If you need to clear all cache, we recommend clearing any theme or plugin cache first.

You can clear the cache in your WordPress dashboard, in MyKinsta, or with WP-CLI (in a terminal/SSH client). We outline how to clear each type of cache in their respective guides and combine that information below.

Clear Cache in Your WordPress Dashboard

With the Kinsta MU plugin (installed by default on all Kinsta-hosted sites), you can purge cache right from the WordPress dashboard, including:

  • Full-page cache.
  • Object cache.
  • CDN cache.
  • All cache.

Log in 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.
Clear cache from your WordPress dashboard with the Kinsta MU plugin.

To clear the cache for specific URLs or paths automatically 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 in MyKinsta

Log in to MyKinsta and go to WordPres Sites > sitename > Tools.

Click the Clear cache button to clear the site cache.

  • When Edge Caching is enabled, clearing the site cache in MyKinsta also clears the Edge Cache.
  • If you’ve added the Redis addon to your site, clearing the site cache in MyKinsta also clears the Redis object cache.
Clear cache on the Tools tab in MyKinsta.
Clear cache on the Tools tab in MyKinsta.

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 full-page cache and the edge cache (when Edge Caching is enabled) with this command:

wp kinsta cache purge

If you only want to clear the site cache without clearing the edge cache, add the --site flag:

wp kinsta cache purge --site

When Kinsta CDN is enabled, you can clear the CDN cache by adding the --cdn flag:

wp kinsta cache purge --cdn

If you’ve added the Redis addon to your site, you can clear the Redis cache by adding the --object flag:

wp kinsta cache purge --object

To clear all cache, add the --all flag:

wp kinsta cache purge --all

Flush your site’s object cache with the following command:

wp cache flush

You can also chain both commands on a single line:

wp kinsta cache purge && wp cache flush

Exit SSH with the following command:

quit

Clear Redis Cache With SSH

If you’ve added the Redis addon to your site, you can connect to your server with SSH and flush the Redis cache with the following command:

redis-cli flushall async

Exit SSH with the following command:

quit
Was this article helpful?