WordPress is great and I use it on every site I build. As I continually follow what is developed for this Content Management System, I realize that there are many things that blog owners can do to speed up their loading times. This doesn’t involve adding header codes to compress the content, rather utilizing a plugin that creates a HTML based document of your dynamic WordPress blog.
How To Cache WordPress for Maximum Efficiency
The caching techniques I’m going to be talking about later takes all of the dynamic PHP contents of your blog and puts it into a HTML document. That means this plugin takes your template (header, body, sidebar(s), footer) and articles and puts it into one document. The benefit of doing this is that the server does not need to “construct” the HTML document using various PHP calls to the MYSQL database and theme files each time a visitor loads your blog.
Let me put it to you in the simplest form possible – The difference between a cached blog and a standard WordPress install is monumental. A cached blog is like giving a person an infographic – one image with all the important information on it, organized and concise. A standard WordPress install (uncached blog) is like giving a person a 20 page report filled with text and telling them to make sense out of it. As you can see the benefits of caching your WordPress website is a very good idea.
The De Facto Standard for WordPress Caching – W3 Total Cache
This plugin combines various aspects of other plug-ins to ensure that everything is running at maximum efficiency. In this tutorial were going to look at how to set up this plugin and configure it.
Step One – Download and Install W3 Total Cache
This plugin can be found at this repository and installation with WordPress 3.0 is very easy. Simply upload it using WordPress’s built-in plug-in installation system and you’re ready to continue to step two.
Step Two – Page Cache Settings and Configuration
Caching pages will reduce the response time of your site and increase the concurrency (scale) of your web server.
All right in this step were going to be setting up the page cache for your WordPress website. Click the “W3 Total Cache” option under the settings tab in your WordPress administration area. You are now brought to the plugin’s main page with various settings and this step were just enough focus on the page cache configuration.
So go ahead and click the checkbox, enabling it. For most of you reading this, choosing Disk (Enhanced) is your best option for shared hosts. However if you happen to be on a dedicated or virtual server feel free to install APC caching which is what I use. Now click “save changes” to enable the caching on your site.
Step Three – Minify settings and configuration
Minification can decrease file size of HTML, CSS, JS and feeds respectively by ~10% on average.
Like in the previous step we are going to need to enable Minify for it to work on our WordPress blog, so enable it and click save changes, replicating the same option that you did in step two (IE – Disk Enhanced/APC). Now at the very top you’ll see “Minify Settings” – we’re going to need to configure it before this starts working.
Here’s what I have on my WordPress blog:
- HTML Minify settings: Enable
- JS Minify settings: Enable
- CSS Minify settings: Enable
There are a couple of them notes that you should be aware of:
- For CSS minification to work you’re going to need to add each stylesheet to the plugin by hand. For most themes the default is: wp-content/themes/YourThemeName/style.css – if you need help finding yours feel free to ask me in the comments and I’ll take a look at your site.
Step Four – Database cache settings
Caching database objects may decrease the response time of your blog by up to 100x.
This plugin will also cache your database to make it more efficient when generating a page cache. Feel free to go to the plugin’s page and enable it.
This step is pretty easy because there are no options that you need to configure specific settings page.
Step five (optional) – CDN Configuration and Settings
If you utilize a Content Delivery Network to serve your files faster to your visitors than this plugin will also rewrite your URLs to the files on the CDN. This saves you a lot of time from having to go in manually to your theme files and edit each file accordingly. If you do not have a CDN then there’s no reason to do this step – you are finished! Although I would encourage you to take advantage of MaxCDN’s offer that I wrote about earlier which you can view here.
We’re going to need to configure the CDN settings of this plugin, so please click the, “CDN Settings”. On this page there is a box for you to insert your content delivery network URL which you can obtain from your provider. Simply enter your URL and click save changes in the plug-in will automatically start using the files on the CDN and rather than on your own web hosting server.
Conclusion — A Mighty Fast (Cached) WordPress Blog
Since utilizing this plug-in on my own personal blogs and clients blogs I’ve noticed a severe increase in the responsiveness and load times of each website. If you are serious about taking your blog and expanding its reader base a fast website is critical. Luckily people like Fredrick Townes create excellent solutions to take a couple hour optimization job and turn it into a 10 minute “push-button” cache job.
Do you currently use any caching plug-in for WordPress?
How has this plug-in affected your load speed?
Do you notice a difference?
Related articles on the Internet.
- W3 Total Cache : WordPress Caching Plugin (earnblogger.com)
- WordPress Caching: What’s the best Caching Plugin? (tutorial9.net)