What to Look for in a Great WordPress Caching Plugin

WordPress has been around for the better part of a decade, and that means there are some truly massive websites and databases that get queried on a regular basis. Those queries can add up pretty quickly and, over time, they can actually slow down the website and increase how much bandwidth it uses in an average month. As any web hosting customer knows, bandwidth can be particularly expensive and it can be a real drain on the budget if an upgrade is needed to a more premium plan to accommodate all of these queries and page loads. This might seem like just another natural part of a website’s growth, and it might seem like something that administrators will just have to learn to accommodate and deal with, but that is actually not the case.

There are a number of innovative and helpful WordPress plugins that actually cache websites and database queries in order to prevent the slow-down of a website’s loading times or the exponential increase in required and utilized bandwidth. These plugins have been around for quite some time, in some cases, but they differ in terms of features and capabilities. That means that there is often some confusion when “shopping around” for the best WordPress caching plugin, and some users simply pick the first one they can find because they simply are not aware of what to look for in this type of plugin. This, however, does not need to be the case. There are a few key questions to ask, and a few features to look for, when deciding whether or not a cache plugin is great, good, or simply a bad idea.

Does it Cache Database Queries?

Cache plugins can create a relevant cache for a number of items on the website, but there is no single thing more in need of caching than database queries. This is essentially the interaction between the PHP template file and the database, and it happens every single time a user loads every single WordPress-rendered page. Essentially, when they load what seems like an XTHML file from the web browser, that file is actually only rendered because the PHP template file it utilizes asks the database information about the we bite’s title, its posts, its sidebar widgets, and any other plugin tags scattered throughout the design.

The average WordPress website can feature anywhere from a minimum of 20 queries up to an average of about 200 queries for every single page that is loaded by an end user. That’s a tall order, especially when the database itself is already quite large and full of a decade’s worth of posts. In order to reduce how often this long list of queries runs, virtually every user in the market for a caching plugin should look for one that caches the actual database queries required by WordPress. This essentially means that the plugin will be storing all of that information in a static file outside the database; it will then pull that information back into the WordPress templates every time those templates are reloaded — unless or until the information contained within the templates is changed in some way by the administrator.

Simply put, database queries at the most commonly cited reason for requiring a caching plugin. Any plugin that specifically leaves out this feature should probably be left out of the WordPress Dashboard entirely, unless the database isn’t that large or file caching is more important to the administrator.

Is the Caching Plugin “Messy” or Does it Self-Contain the Created Cache Files?

One thing that almost every WordPress administrator fails to think about when they look for a caching plugin is the way the plugin stores cached files. In most cases, caching plugins will create a series of files containing template information, and then they’ll store those files in a subfolder within the “plugins” directory. This is considered a neat and tidy way to get the job done, and it’s the most common practice by today’s WordPress caching plugins. However, there are exceptions to this rule that will pollute a web server with all kinds of inappropriate files.

One of the best examples of “polluting” the server with cached files is the WP-Cache plugin. For reasons unknown to virtually every WordPress administrator, this plugin actually creates cache files that reside within the plugin directory, as well as in numerous locations outside that directory among the standard WordPress configuration and function files. This, in simple terms, is really messy. It’s not an efficient way to cache things and, although the WP-Cache plugin is revered as one of the best and most effective solutions on the market, there is really no excuse for performing this way. Furthermore, the plugin does not actually delete these “messy” files when it is deactivated or uninstalled. That creates the kind of lingering “cruft” that can slow down a server even as administrators try to make websites load faster via caching. Counter-productive caching is no good, and it should be avoided.

Does the Plugin Cache Websites in Addition to Queries?

Some caching plugins for WordPress have gone a step further in recent years, opting to cache both the XHTML template output and the queries that are used to produce that output. Essentially, this turns WordPress into a “static” content management solution, and files will only be updated if a user makes a major change or requests an update to the output. Generally, administrators will have to produce a new entry in order to get a new template produced for end users. If those same administrators make changes to a template file, they’ll often have to manually refresh the cache so that the changes can be seen publicly.

This might sound kind of antiquated, and really inconvenient, but it’s the best way to turn a really broad and complex site into one that loads pretty quickly under all conditions. For very big websites, it actually makes good sense to cache the XHTML and CSS output of a template file, as this produces the kind of static files that can load in under a second on both mobile and desktop computing devices. It’s worth considering for larger sites, and even smaller sites might want to take advantage of this decreased page loading time.

Does the Plugin Work with Mobile Devices?

For whatever reason, some of the most popular caching plugins for WordPress actually do not work with typical smartphones and tablet devices currently on the market. Instead, those devices are treated to the same dynamic XHTML and CSS output, as well as the same dynamic WordPress database queries, that they would be if the site had no caching plugin installed or activated. However, as smartphones have risen dramatically in popularity of the past several years, it is now virtually a requirement to cater to these devices when deploying a cache-based WordPress website to the public. On top of that, these devices typically use slower mobile data connections where a cached output would actually enhance the overall user experience and promote greater mobile use of the website altogether.

When perusing the WordPress Extend gallery of plugins for a caching solution, look into the plugin’s support for smartphone and tablet devices. If no such support is offered with the plugin, it should probably be passed over for a more robust and flexible solution that caters to this growing market of users. The good news is that many developers are finally recognizing mobile device support as a key component for their developments, so it may not be long until this is a standard feature of every current caching plugin.

How Does the Caching Plugin Treat Administrator or Author Users?

One of the more frustrating effects of some caching plugins is that they actually cache the XHTML output of the page and store it as a static file. This is great, because it speeds up page loading times across desktop and mobile devices when they’re supported. It’s not so great, though, because it can make template development and alteration particularly hard to pursue. When a page’s actual XHTML output is cached, any modification to the PHP template file will not be reflected by the page until the cache has been manually refreshed. Especially for trial-and-error designs, this can be a killer feature that makes development kind of unappealing.

The good news for developers is that many WordPress caching plugins now make exceptions for logged in users. When an administrator or author is logged into the WordPress Dashboard, they’ll essentially see an un-cached version of the website until they’re logged out of the administration area. That eases development and makes it just as easy as it would be if no caching plugin was installed or activated in the WordPress Dashboard. It also means that caching still runs effectively for non-logged-in users; they’ll appreciate the speed they get in the meantime, and they’ll never know the difference.

Furthermore, since the cached version of the site will not reflect design changes until the cache is refreshed, it makes it possible to bug test designs right on the public version of the website without interrupting the actual functionality of the site for typical users. It’s a neat trick, and a handy feature, for developers and administrators of cached sites.

Does the Plugin Selectively Cache Only Certain Parts of the Site?

One of the newest ways to pursue a robust caching experience is actually to “spot-cache” the most static areas of a website’s design. This might mean that a caching plugin specifically creates cache file for the header, footer, and certain parts of the sidebar, while leaving the main content area of the WordPress Loop out of the cached files entirely. This makes sense, of course, since the WordPress Loop is used to show both the website’s posts and the content on any dynamic WordPress page created within the WordPress Dashboard. Headers, footers, and sidebars, are very unlikely to change dramatically over a longer period of time, making them prime targets for the plugin.

This selective caching is not the best way to speed up a website, of course, since it leaves some major parts of the site outside of the created cache files. However, it will steal lead to a pretty robust caching environment that will speed up the page’s processing and rendering times by a few seconds. Those few seconds will certainly be noticeable, and they should still be considered a valid and verifiable success of the plugin’s methodology.

Does the Cache Plugin Actually Have Any Results?

Sometimes, people like to think that a caching plugin is promoting faster page loading times when it actually isn’t. And, because these plugins can sometimes mean the difference of only a few seconds, or even a fraction of a second, it can be hard to subjectively measure the effectiveness of a cache plugin just by watching the page itself load into the browser window. For this reason, every cache plugin should be tested after installation to verify its effectiveness.

Today, many analytics tools are including options to measure how long it takes to load a page on average. These statistics are collected from every user that visits a website, and they’re stored within an area like the Google Analytics Dashboard for interested administrator users. This type of tool should absolutely be used to measure just how effective the caching plugin really is; if there is no noticeable shift in page loading times, then it’s pretty likely that the plugin is simply not doing its job in the way that it should. A different plugin should be chosen instead, and will probably lead to far better results.

Caching Plugins are Advanced, but Picking One Should Not Be

Overall, choosing the right caching plugin comes down to recognizing the kind of speed bump a website requires. Is that speed increase needed more for desktop or mobile users? Is it the database that slows a site down, or is it the XHTML template file? The answers to these questions will line up with one of many very different WordPress caching plugins and make the choice between them relatively easy.

Author: (40 Posts)

Vladislav Davidzon is the principal of US-based online marketing consultancy Vladislav Davidzon & Associates, developing integrative solutions through high impact search engine optimized WordPress websites for socially responsible customers of all sizes around the world.