Like
Like Love Haha Wow Sad Angry

When someone visits your website, you have mere seconds to grab their attention and keep them engaged in what your site has to offer. The faster your website loads when visitor arrives, the better. If your overall site performance is low however, you risk alienating a portion of the traffic your site receives.

Your WordPress website shuttles lots of information between many different computers, near and far, to deliver content to your readers. Would you like to know a great way to quicken the retrieval time of your content, increase your site’s overall speed and performance, and even lessen the traffic that flows around the internet on a consistent basis?

If so, you are in the right place. The fastest, most efficient way to optimize your WordPress website is through a concept called caching,  and in this article we will explain how you can make use of this to improve the speed of your website.

Caching Basics

Before I explain exactly what caching is, I think it is important to first understand what exactly happens when a visitor enters your website.

When someone types in your website’s address a lot of things start to happen. The visitor’s browser first contacts your web server in search of your website.  Your WordPress site then contacts your host (housed somewhere else on some other computer, possibly far, far away) using specialized PHP code. Your host then accesses the main database (usually MySQL) where all of your website’s content is stored. This database then takes that request, compiles it into a readable HTML page, and shoots it back to your WordPress site where the reader can actively see it.

Sounds confusing? Let’s take a look:

The flow when a visitor visits your site
The flow when a visitor visits your site

The problem with this process is that it can potentially take a long time to retrieve the visitor’s request from the main database, thus slowing down the speed of your website. Now, no one wants a slow website, and no one wants to visit a slow website. That’s where caching comes into play.

Caching is a temporary storage of frequently accessed data on a website that allows for quick and easy retrieval. By reusing data from your website that is tapped into on a regular basis, your site avoids having to conduct round trips throughout the internet to retrieve that information.

In other words:

Cache Results
Cache Results

Caching How and Why

There are several ways caching helps to increase you WordPress site’s speed. By creating static, or unchanging, HTML files and saving them for later use, caching effectively decreases you server’s load, lowers your bandwidth use, and most importantly, helps your site avoid delays in relaying information to your visitors.

This is done in two main ways:

Browser Caching

Web browsers keep a local cache of all HTML files that have been downloaded on any given site. When a request is made by a reader to visit your website, your WordPress server (should your site be configured to cache its content) is “asked” by the browser whether the files attempting to be accessed have been changed since they were last downloaded. If the files have not been changed, the web browser simply acquires the information from the local cached copy, instead of requesting that information from the database storage.

Most images on your website are static and rarely change. Even with steady content being uploaded to your site, files such as your header, basic pictures, footers, and sidebars usually remain unchanged. This results in a reduced number of requests per page, because all of the static files are cached. These are perfect files to be cached on your site to decrease your site’s load time and the overall burden on your server.

WordPress Caching

This type of caching is configured on your WordPress server through the use of a caching plugin. There are many ways to customize your chosen plugin to meet your site’s needs.

WordPress stores your pages in parts in the main database for later use. When a reader makes a request on your site, your site must then retrieve those parts from MySQL and compile them so the reader can view them as a full web page (remember the above graphic?). If however you are using a caching plugin, these HTML pages are saved in their entirety in the cache already constructed and ready to be delivered quickly.

Another way you and your WordPress server can optimize your website’s performance is by configuring your caching plugin to save query results that are popular on your site. Think of your most popular posts, your static pages like your “About Me” or “Contact” pages, things like that. Rather than retrieve this information from across the internet again and again, wasting time and slowing your site down, the cache holds onto the results of these queries and provides them to the reader right away. Again, think fast and efficient content retrieval.

Dynamic (Changing) Files

Up until now, the focus of caching has been solely on the idea that it works best when dealing with unchanging, more permanent files. And it does. This unchanging content makes it easy for your caching plugin to store data nearby for delivery when called upon.

However, caching is not just for static files. In fact, even dynamic, or ever-changing files can benefit from caching as well.

When you configure your caching plugin, there is an option to set an expiration date. This date tells your cache storage that for that set amount of time (whether it be 1 week, 1 month, even 1 year) that particular file will remain unchanged, therefore it is safe to cache and use for future requests.

For instance, your WordPress header is normally an unchanging image, cached so that when someone enters your site your image appears fast as lighting. Yet, it is safe to say that at one point or another this header image may be replaced (therefore becoming a dynamic file) by an updated image more to your liking. It is in this way your cache can update itself after the expiration date passes, refreshing the image cache and displaying the new image just as quickly to your readers. And what’s even better is that since this expiration date is configured to happen automatically, you don’t even need to remember to re-cache anything on your site that is normally static but that may change occasionally.

Even more so, dynamic files can also have lower expiration dates set so that they are constantly being cached but at a much quicker rate.

Caching Plugins for WordPress Websites

There are many different choices when it comes to deciding which caching plugin to use on your WordPress site. Although they all increase the speed of your website (because they all effectively cache you content), there are many options to choose from when it comes to configuring your actual plugin.

Let’s take a look at the two most popular caching plugins for WordPress:

W3 Total Cache

W3 Total Cache plugin
W3 Total Cache plugin

This plugin is used by many high profile sites such as GoDaddy, AT&T, and mashable.com. It touts a 10X overall site performance boost and saves 80% bandwidth using minify and HTTP compression of HTML, CSS, JavaScript, and feeds.

It caches browsers, pages, objects, databases, feeds, search results, and much more. You can easily set expiration dates for each type of caching your website employs.

The additional features this plugin offers are astounding. In fact, for the average WordPress user, this plugin might be a bit too much, with 16 pages of individual configuration choices to wade through. You may even need help from your hosting company should you run into any issues trying to configure it by yourself. Luckily, the default settings are fairly optimal and easy to access, therefore modifying the settings is not necessarily important.

The only caveat to W3 Total Cache is the fact that it relies heavily on memory (rather that disk) caching. While this yields far better results, most WordPress users are on a shared server and have a basic account. This means there may not be enough room on the server for you to memory cache. In fact, it may not even be allowed depending on your hosting service and the resources you are allowed to access.

That being said, W3 Total Cache is working for almost a million WordPress users and their websites. Based on its features, this plugin needs no explanation as to why it is one of the most recommended caching plugins on the market right now.

WP Super Cache

WP Super Cache Plugin
WP Super Cache Plugin

Generating static HTML files from your dynamic WordPress blog, WP Super Cache is another contender for best WordPress caching plugin.

This plugin takes what HTML files your server delivers and keeps them for later use, instead of providing the slower PHP coded scripts. These files, although delivered to most of your website’s readers (99% of them actually), are not given to all users. Those included in receiving static files are:

  • Users who are not logged in;
  • Users who have not left a comment on your blog;
  • Users who have not viewed a password protected post.

The remaining users will continue to receive the same files, though they are cached in a different way.

There are 3 settings used to utilize this popular plugin to speed up your site’s performance:

Mod_Rewrite mode skips PHP coding altogether when retrieving static files for your readers. This is where the idea of “supercaching” comes to life. This “supercaching” is only employed during heavy traffic or when your server is under performing. But don’t worry, though your users may not experience this “supercaching” often, they will experience no additional delay during normal site performance.

PHP mode is when your server uses PHP to deliver the static files. This is not quite as fast as Mod_Rewrite but for most WordPress users this will be fast enough.

The last mode is called legacy caching. This is for the 1% of people not experiencing the static file delivery in Mod_Rewrite mode because they are known users of the website.

This plugin is super simple and the recommended settings are easy to configure and set up.

WP Super Cache Plugin Setting
WP Super Cache Plugin Setting

It is recommended however that you check the advanced section and enable all of the “recommended” boxes.

WP Super Cache Plugin Setting
WP Super Cache Plugin Setting

In the end, WP Super Cache seems more user friendly and simple to use compared to W3 Total Cache. It does not however lack in the feature department and it definitely increases the speed of your site.

Runners-Up

With all of the WordPress caching plugins available, it was obvious to stick with the two most popular. However, there are some notable others that can provide all of the benefits of caching to your WordPress site as well. They include:

WP Rocket
WP Rocket is a popular premium caching service for WordPress websites. Part of its appeal is that its perhaps one of the easiest caching solutions to apply to your website. This helps make it a perfect choice for those who just want a faster website, and don’t mind investing a little so that they can start reaping all the benefits that come with improved loading times.

ZenCache
Previously known as Quick Cache (Speed Without Compromise), ZenCache is for the most basic user who doesn’t want to be bogged down with advanced settings and confusing computer lingo. Simply enable caching and let it do its job.

WP Fastest Cache
Another super simple, yet very popular plugin.  WP Fastest Cache offers only 10 settings on the main page to configure. It also allows for automatic cache clearing when a new post is published.

Hyper Cache Extended
Based on the original plugin Hyper Cache, this plugin is a good choice for those with limited resources on a basic shared hosting plan.

Conclusion

All WordPress websites, big or small, simple or advanced, should make use of some type of caching plugin in order to maximize site performance. Not only does this improve your visitor’s experience and encourage them to come back for more, it will help to drive overall traffic to your site thanks to improve search engine rankings.

In the end it doesn’t really matter which caching plugin you choose to use. They all offer faster loading times and an overall performance boost. Try a couple out. Test the speed of your site using Google Page Speed. See which advanced settings you like and dislike, and then make a decision.

Website speed is like your reputation. If you let it deteriorate, no one will want to visit. So make a good impression on your visitors, and start using a WordPress caching plugin today.

Do you have any questions about choosing a caching plugin for your WordPress website? What’s stopping you from implementing this technology to start speeding up your website? Please post your comments below.

Like
Like Love Haha Wow Sad Angry

Joe

As well as being a regular WordPress user, Joe writes for some of the most popular WordPress blogs, sharing what he's learned about this most versatile platform. If you would like to work with Joe to get content for your website, please visit his website for more information.