This post is about getting most out of WP Super Cache plugin for wordpress.
A lot of people, use WP Super Cache Plugin for WordPress, generally what it does, is to generate HTML pages out of the wordpress site, and cache them for X amount of time. And this is really good, first of all because the site will get much faster, which makes the visitors happy. But 2nd, google actually rank on website performance, and being able to serve a website faster, will give a little better ranking.
But lots of people, just enable the plugin, and never use any of the settings that is possible to use. But you can make your site even faster, by playing a little with the settings.
First of all, what you need to do, is to install the plugin, and enable it.
Then you should go to settings, and click on the ‘WP Super Cache’ item. and then set ‘Caching On’ and press save.
Go to the advanced tab, and make sure following settings is set:
So let me explain a little, about what the settings to.
First of all, you have 3 different ways, to use the caching method.
- Use mod_rewrite to serve cache files.
- Use PHP to serve cache files
- Legacy page caching.
There is nothing really special about the Legacy page caching, it works like the WP Cache does already. It caches the pages, but still uses PHP, and normal database calls to get the content. And this shouldn’t be used at all.
The Use PHP to serve cache files
What is does, is that it generates html pages out of your site, and uses PHP to serve the files, which is faster than the normal way of doing it, but you still start the PHP processes. Which will take time, but also increase the load on the web server. This works on most webhosts, and this is the default way users should be doing.
Use mod_rewrite to serve cache files is the best method of actually serving the generated HTML pages, but why?
mod_rewrite is a module that is built into Apache, which means that the only thing we touch, when a visitor comes to our site, is apache itself. This is lightning fast, because we don’t need to start the PHP processes. What you need to do, when this is enabled, is to update your .htaccess file, which is a file that apache reads when there is a pageview. It will redirect traffic to another folder, where the generated HTML pages is. So we’ll never touch PHP at all. This means your site is much faster, and that the load on the server will be lower. Which means you can have a lot more visitors at same time.
So if possible, you should use the mod_rewrite method.
Next function that is enabled is ‘Compress pages so they’re served more quickly to visitors’ – This will as the function says, compress all the pages generated, to be smaller. Often up to 80% smaller, so people on slow connections will receive the site faster than normal.
‘Don’t cache pages for known users’. What this does, is that people that is logged into the website, won’t get cached pages, so let’s say you’re logged in, doing some updates, you’ll be able to see those updates or changes.