WordPress Tutorials
SiteGround Optimizer Plugin Tutorial
Caching in SiteGround Optimizer

Caching in SiteGround Optimizer

This tutorial covers the following topics:

The SiteGround SuperCacher system provides 3 layers of caching for your site – NGINX Direct Delivery, Dynamic Cache, and Memcached. NGINX Direct Delivery is switched on by default for all our users and is not WordPress-specific. The greatest performance boost for WordPress is achieved by using the Dynamic Cache and the Memcached. The Dynamic Cache is also switched on by default on all our servers and it works out of the box with WordPress websites. However, you can achieve the best results if you use our SiteGround Optimizer to manage its settings. Memcached has to be switched on by the user in Site Tools (learn how in our SuperCacher tutorial), and then connected to your WordPress with the SiteGround Optimizer plugin (learn how below).

Dynamic Caching

Dynamic Caching is a full-page caching mechanism powered by NGINX. It is activated by default on a server level and, even if you do not have the SiteGround Optimizer plugin installed, we will still cache your WordPress. However, the SiteGround Optimizer allows you to have much more control over this process and we highly recommend that you use it for the best dynamic cache results and for full access to the configuration options.

Through the main switch, you can control whether your website is cached or not.

Automatic Purge

Enabling this option will allow our plugin to clear parts of your cache once it detects changes in your content. We’ve developed a set of rules to purge the dynamic cache in a smart, efficient way depending on the change that has occurred on your site. We do a full purge on events like category deletion, plugin and theme update or switch, WordPress core update, etc. On the other hand, we do smart purge when a post is modified, a comment is added or a category is updated for example.

You can also choose to automatically flush the WordPress REST API cache too. This could be useful if you are using the API with external third party WordPress tools that depend on it to ensure there is no delay in the information they receive about your website.

We highly recommend this option to be ON, as it ensures that new content is timely shown on your site. However it is recommended to leave the REST API automatic cache purge option disabled unless you are actively using the REST API at the moment and you are experiencing problems with it.

Manual Cache Purge

Pressing this button will completely clear the Dynamic Cache stored for your website. Usable, if you want to make sure that you’re loading the latest version of your site.

Important! If you have a WordPress multisite with a subdomain setup you must add the separate subdomains as parked in Site Tools > Domain > Parked Domains for the cache purging to work.

Exclude URLs from Caching

In certain cases, you may want to exclude parts of your website from the cache. We’ve developed an easy interface to do that. Click the pencil icon next to the Exclude URLs from Caching option and this will open a new window where you could simply paste the relative path to the URL you want to exclude or the entire URL – we will parse it and add it into the right format.

In addition to exact URLs, you can use the wildcard sign “ * ” to exclude entire sections of your site. For example, if you want to exclude all posts in the “business” category, you can add:


Or, if you want to exclude all URLs that have the word “business” in it, you can add:


Exclude Post Types

With this optimization, you can exclude all posts from the specific post type being cached by the Dynamic Cache. This will make sure all of them are served non-cached for all users.

How to Enable Browser-Specific Caching

We recommend you to enable this feature only if you’re experiencing issues with plugins, generating mobile version of your site or similar functionality. Once enabled, the cache has to be generated separately for different browsers which lowers its efficiency. To enable this feature move the Browser-Specific Caching toggle to ON.

Test Cache Status

Our caching system relies on headers and can be a bit tricky, especially for new users to tell if a certain result is served dynamically or from the cache. That’s why we’ve developed a quick cache testing tool to verify whether your URLs are properly cached. In addition to that, it’s a great way to test if URLs you’ve excluded from the cache are actually dynamic.


Memcached is one of the most popular object caching solutions. Once it is active for your account, you need to turn on the Memcached in the SiteGround Optimizer plugin too. This will configure your site to use the service.

Tutorial Menu

Share This Article