How to use the Performance Cache plugin for WordPress
The Performance Cache plugin for WordPress is part of our one.com parent plugin. It helps you optimise the speed of your WordPress website using Varnish caching and CDN. This article explains how the Performance Cache plugin works and how to use it.
- Why should I use the Performance Cache plugin?
- How does Varnish caching make my site faster?
- What is CDN, and how does it improve loading times?
- How can I activate the Performance Cache plugin?
- Plugin limitations
- Set cache time-to-live (TTL)
- Clear Performance Cache
Why should I use the Performance Cache plugin?
Nowadays, nobody wants to wait for slow websites. People prefer to read, browse and especially shop on fast websites. The longer a page needs to load, the more likely it is that visitors will leave the website. Every second counts, so make sure to optimise your website's performance and benefit from a faster website.
Our Performance Cache plugin can help you speed up your site to improve its user experience.
How does Varnish caching make my site faster?
The first time a visitor visits your site, the Performance Cache plugin saves a copy of your site on a Varnish server. All subsequent visitors will be served with this copy, which takes less time than getting it from the storage server, thus making your site load faster.
Watch the video by Varnish below to find out how it works:
What is CDN, and how does it improve loading times?
A content delivery network (CDN) is a network of servers in multiple locations across the globe. It saves copies of your website in different locations and picks the one closest to your users’ location. As a result, your website's data needs to travel a shorter distance, making your site load quicker.
A CDN is handy if you have a lot of visitors around the world, as loading a website from a server in your country will always be faster than loading the information from the other side of the planet.
How can I activate the Performance Cache plugin?
The Performance Cache plugin is enabled by default if you have installed WordPress with our 1-click installation tool. You can see the plugin in WP Admin under the one.com parent plugin, and also in the black bar at the top of the page.
If the plugin is not activated, you can activate it manually in the one.com parent plugin.
- In WP Admin, click one.com > Plugins.
- On the Performance Cache tile, click Install and then Activate.
- Click Performance > Performance Cache in the side menu to activate it and adjust settings.
Plugin limitations
You should be aware of some limitations when using the Performance Cache plugin.
- Each URL of your site needs to have been visited at least once before it is saved in the Performance Cache. So some pages of your site might be stored in the cache, and some not.
- If you have a lot of dynamic content, like a header with changing images, we recommend disabling the Performance Cache plugin. The cached copy of your site on the Varnish server may not be the same as the actual site.
- Plugins that require PHP executions don't work correctly with Performance Cache enabled, for example, visitor counters.
Set cache time-to-live (TTL)
When people browse your website, the static contents (images, etc.) are downloaded from the server and stored in the local browser cache. The TTL (Time to live) determines how long the information stays cached. After reaching the assigned lifespan, the plugin will perform a routinised clearing of the local browser cache.
The Cache TTL is set for 30 days or 2592000 seconds by default, which works well in most cases.
We recommend lowering it if you update your site regularly, or if you are currently working on it.
- In WP Admin, click Performance Cache.
- Type in a new value for TTL.
- Click Save.
Tip: If you are working on a new version of your site, we recommend trying out the one.com Staging feature. It allows you to try out changes without your visitors noticing.
Clear Performance Cache
If you don't want to wait until the cache is automatically updated, you can clear it manually. This way visitors can see the latest changes on your site right away.
- In the left-hand menu, go to Performance Cache and click Clear cache now.
- Repeat this action for the CDN Cache and click Clear CDN cache.
Tip: You can also use the shortcut at the top of your screen to clear the cache manually.
The cache is cleared automatically in the following cases:
- A page or post is added/updated.
- The active theme is changed.
- Performance Cache settings are saved.
- Widgets on your site are added/updated.
Related articles: