You always be wondering as well as finding the ways by which you can increase the speed of your WordPress blog. The easiest way of doing so is to install a WordPress cache plugin. These plugins are available for free and work towards increasing the speed of your blog. These two are the most popular WordPress cache plugins as they both are easy to use and easy to configure.
In this article I will tell you about two of the best WordPress cache plugins: WP Super Cache (WPSC) and W3 Total Cache (W3TC). First if you do not know much about these plugins, then to tell in brief, WP Super Cache plugin will convert dynamic pages from your WordPress blogs into static HTML files but it lacks many of important features that W3 Total Cache plugin offers. W3 Total Cache plugin includes page caching, minify, database cache, object cache, browser cache and CDN support.
For mine two of publications, I2Mag and JustWP.org, I have been using both of these cache plugins and I will share the results of both with you. To start with, I will tell you that for I2Mag, I have been using WP Super Cache plugin while for JustWP.org, I have been using W3 Total Cache, and so it lets me give you a clear idea on which one is the best and to decide with which one to go with.
How Does A WordPress Cache Plugin Works?
If you have a cache plugin installed and configured on your website, the plugin will generates a static html files from your dynamic WordPress blog. As soon as an html file is generated, your webserver will server that file to visitors instead of processing the comparatively heavier and more expensive WordPress PHP scripts which in turns also increase the speed of your blog.
If there is only a single visitor, then it hardly makes any difference, but since your blog have to serve hundreds of visitors daily, at that time these cache plugins plays their role by serving static html files to them. On an whole about 99% of your visitors will be served static html files, while those 1% who don’t see the static files, they will see the different cached files which too are not different and are just better than uncached. In short these plugins will work towards letting your server cope with a front page appearance.
WP Super Cache
- A plugin and hooks system. A common complaint with WP Cache was that hacking was required to make it work nicely with other plugins. Now you can take advantage of the simple plugin system built in to change how or when pages are cached. Use do_cacheaction() and add_cacheaction() like you would with WordPress hooks. Plugins can add their own options to the admin page too.
- Works well with WordPress MU in VHOST or non-VHOST configuration. Each blog’s cache files are identified to improve performance.
- Normal WP-Cache files are now split in two. Meta files go in their own directory making it much faster to scan and update the cache.
- Includes this WP-Cache and protected posts fix.
- Automatically disable gzip compression in WordPress instead of dying.
- As Akismet and other spam fighting tools have improved, the cache will only be invalidated if a comment is definitely not spam.
- A “lock down” button. I like to think of this as my “Digg Proof” button. This basically prepares your site for a heavy digging or slashdotting. It locks down the static cache files and doesn’t delete them when a new comment is made.
- Supercache static files can be regenerated while serving a slightly out of date file. This will significantly lower the load on a busy server with lots of traffic and comments. Think of it as an automatic “lock down mode” for every page on your site.
- Automatic updating of your .htaccess file. (Backup your .htaccess before installing the plugin!)
- Don’t super cache any request with GET parameters.
- Better version checking of wp-cache-config.php and advanced-cache.php in case you’re using an old one.
- Better support for Microsoft Windows.
- Properly serve cached static files on Red Hat/Cent OS systems or others that have an entry for gzip in /etc/mime.types.
- The Reject URI function now uses regular expressions.
- Supports the Bad Behaviour plugin if installed (Half on mode only).
- Supports plugins that show a different theme to mobile devices.
- You should have the Apache mod mime and mod rewrite modules installed and WordPress custom permalinks (Settings->Permalinks) enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use PHP or legacy caching.
- If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE and WPCACHEHOME defines are deleted, and remove the files wp-content/wp-cache-config.php and wp-content/advanced-cache.php. These will be recreated when you install this plugin.
- Upload this directory to your plugins directory. It will create a ‘wp-content/plugins/wp-super-cache/’ directory.
- If you are using WordPress MU or WordPress Multisite you can install the plugin in the ordinary plugins folder and activate it “network wide”.
- WordPress users should go to their Plugins page and activate “WP Super Cache”.
- Now go to Settings->WP Super Cache and enable caching. If you see an error message or a blank screen see the “FAQ” section later in this readme for instructions.
- If you choose “Mod Rewrite caching”, mod_rewrite rules will be inserted into your .htaccess file. Look in your web root directory for this file.
- After you have enabled the plugin, look for the file “wp-content/cache/.htaccess”. If it’s not there you must create it.
- Apache must be configured to allow the modules above. If you receive a “500 internal error” when serving requests to anonymous users you need to dig into your Apache configuration.
- wp-content/advanced-cache.php loads the caching engine. This file is generated by the plugin. It uses the constant WPCACHEHOME to load the caching engine.
W3 Total Cache
- Compatible with shared hosting, virtual private / dedicated servers and dedicated servers / clusters
- Transparent content delivery network (CDN) management with Media Library, theme files and WordPress itself
- Mobile support: respective caching of pages by referrer or groups of user agents including theme switching for groups of referrers or user agents
- Caching of (minified and compressed) pages and posts in memory or on disk or on CDN (mirror only)
- Caching of feeds (site, categories, tags, comments, search results) in memory or on disk or on CDN (mirror only)
- Caching of search results pages (i.e. URIs with query string variables) in memory or on disk
- Caching of database objects in memory or on disk
- Caching of objects in memory or on disk
- Minification of posts and pages and feeds
- Minification of inline, embedded or 3rd party CSS (with automated updates)
- Browser caching using cache-control, future expire headers and entity tags (ETag) with “cache-busting”
- Import post attachments directly into the Media Library (and CDN)
- WP-CLI support for cache purging, query string updating and more
- Deactivate and uninstall any other caching plugin you may be using.If you have customized the rewrite rules for fancy permalinks, have previously installed a caching plugin or have any browser caching rules as W3TC will automate management of all best practices. Also make sure wp-content/ and wp-content/uploads/ (temporarily) have 777 permissions before proceeding, e.g. in the terminal: # chmod 777 /var/www/vhosts/domain.com/httpdocs/wp-content/ using your web hosting control panel or your FTP / SSH account.
- Page caching will automatically be running in basic mode. Set the permissions of wp-content and wp-content/uploads back to 755, e.g. in the terminal: # chmod 755 /var/www/vhosts/domain.com/httpdocs/wp-content/.
- The “Compatibility Mode” option found in the advanced section of the “Page Cache Settings” tab will enable functionality that optimizes the interoperablity of caching with WordPress, is disabled by default, but highly recommended.
- Recommended: On the “Minify Settings” tab, all of the recommended settings are preset. If auto mode causes issues with your web site’s layout, switch to manual mode and use the help button to simplify discovery of your CSS and JS files and groups.
- Recommended: On the “Browser Cache” tab, HTTP compression is enabled by default. Make sure to enable other options to suit your goals.
- Recommended: If you already have a content delivery network (CDN) provider, proceed to the “Content Delivery Network” tab and populate the fields and set your preferences. If you do not use the Media Library, you will need to import your images etc into the default locations. Use the Media Library Import Tool on the “Content Delivery Network” tab to perform this task. If you do not have a CDN provider, you can still improve your site’s performance using the “Self-hosted” method. On your own server, create a subdomain and matching DNS Zone record; e.g. static.domain.com and configure FTP options on the “Content Delivery Network” tab accordingly. Be sure to FTP upload the appropriate files, using the available upload buttons.
- Optional: On the “Database Cache” tab, the recommended settings are preset. If using a shared hosting account use the “disk” method with caution, the response time of the disk may not be fast enough, so this option is disabled by default.
- Optional: On the “Object Cache” tab, all of the recommended settings are preset. If using a shared hosting account use the “disk” method with caution, the response time of the disk may not be fast enough, so this option is disabled by default.
- Optional: On the “User Agent Groups” tab, specify any user agents, like mobile phones if a mobile theme is used.
We had tested both of our website speeds via Google’s Page Speed Insights and the results are:
- I2Mag (using WP Super Cache): The page I2Mag got an overall PageSpeed Score of 80 (out of 100).
- JustWP.org (using W3 Total Cache): The page JustWP got an overall PageSpeed Score of 86 (out of 100)
And The Winner Is…
As per understanding the key features, configuration and our very own speed test, W3 Total Cache is the real winner. The plugin is too good to be used but also if you are just a beginner, then I advice to go for the combination of WP Super Cache with WP Minify.
If in case you don’t have any technical knowledge still you will get the best results with these plugins, just all you have to do is to install and enable them and you are done and ready for the action.