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 also informs you about its limitations.
- Why should I use the Performance Cache plugin?
- How does Varnish caching make your 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 from fast websites. The longer a page needs to load, visitors will likely abandon the website. Every second counts, so make sure to optimise your website's performance and benefit from a faster website.
Caching saves a copy of your website, which will then be shown to the next visitors of your site. This results in faster loading times on mobile devices and computers and can significantly improve your SEO ranking.
How does Varnish caching make your 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.
The people behind Varnish have done a very good job explaining how it works in the video below.
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 that save copies of your website in different locations and picks the one closest to your users’ location. As a result, your website data physically has to travel a shorter distance, making your site load quicker. A CDN is handy if you have a lot of visitors spread across the world. In summary, 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 used the 1-click installer to install WordPress. It will be visible inside your WP Admin under the one.com parent plugin in the menu to the left and the black bar at the top of the page.
If the plugin is not enabled, you can do this manually from the one.com parent plugin.
- In your 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 enable it and adjust settings.
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. In most cases, this is fine.
We recommend lowering it if you have a site with regular updates, or if you are currently working on it.
- In your 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 plugin. 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. That way, you can check the latest changes on your site right away.
- To the left, go to Performance Cache and click Clear Performance Cache.
- 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.