WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

Speed up WordPress with the W3 Total Cache Plugin

Last Updated on June 14th, 2019

Published on January 6th, 2011

Tags: ,

Share This Article

Did you know you can significantly speed up any WordPress blog by adding a cache plugin ?

By default when a visitor views your WordPress blog, your web server makes calls to your site’s database and uses PHP to output the pages to the visitor’s browser. By adding a cache plugin, your blog’s pages are converted into plain html and stored, so a visitor downloads these html pages rather than interacting with the database. This significantly reduces page loading times and allows more traffic through your site.

I first found out about WordPress cache plugins out of neccesity, I used to run a blog that would regularly feature on the homepage of Digg, this would send huge amounts of traffic and my poor server couldn’t cope and would just crash. After adding a cache plugin it was able to handle the traffic, so thats another reason to use one – you can handle large spikes in traffic. I used to use the WP Super Cache plugin on all my sites but I am now moving over to W3 Total Cache as I want to start using a CDN:

CDN is a Content Delivery Network of highly-optimized servers all around the world working together to distribute your content (CSS and Javascript files, downloadable objects, applications, real-time media streams, and much more) through hundreds of servers instead of a single host. This “smart route” technology makes sure each visitor to your site gets their data from the city closest to them.

Description from Max CDN.

In this guide we will be looking at how to add the W3 Total Cache plugin to your site and how to configure it.

Download & Install the Plugin

You can dowload the plugin here, then upload it to your wp-content/plugins folder via ftp. You can download a free ftp client called Filezilla for this purpose.

You can also upload the plugin directly, via your wordpress admin panel by clicking Plugins > Add New > Upload > Install Now.

You will also need to enter your ftp settings there as well, your webhost will have provided these when you signed up.

Article Continues Below

Once the plugin is uploaded, visit your plugins page and click “activate” next to W3 Total Cache. You will now see a new menu in your admin sidebar called “Performance” :

General Settings

Choose “General Settings from the new “Performance” menu. Tick the first box under “General”, this will activate all the parts of the plugin :

The next section is “Page Cache”, this is the part that creates static html pages from your blog pages, ensure it is ticked :

Next up is “Minify”, what this does is remove unnecesary code from your CSS and Javascript files – a lot of times there will be comments and extra spacing in these files which is not needed so minify will remove this and can decrease these filesizes by up to 10%.

The next section is “Database Cache” again make sure this is enabled because this will speed up post and page creation times and your RSS feed as it caches the queries made to the database to create these.

Article Continues Below

“Object Cache”  This setting increases performance for highly dynamic sites (that use the Object Cache API).

The next section is “Content Delivery Network” as I mentioned before, I wont be using this at the moment but will do a future guide to setting this section up, so for now, leave this section unticked.

Lastly we have “Browser Cache”, this enables http compression and adds expiration headers to each visitor’s individual browsers. Tick this section.

Now that we have enabled the sections we want to use from the W3 Total Cache plugin, we will go into each one and check their individual settings.

Page Cache Settings

Choose “Page Cache” from your “Perfomance” menu and make sure the following items are ticked :

These are fairly self-explanatory, I like to make sure that the “Don’t Cache Pages for Logged in users” is ticked so that any changes you make to your blog while working on it are viewed immediately by the admin and you wont see the cached pages. You can always log out of the WordPress admin screen to check the speed of your blog.

Article Continues Below

The next section is “Advanced” you can leave these as defaults – they specify how long to keep the cached files on disk before renewing them, the default is 3600 seconds (5 minutes) you can increase this if you wish, if you do not have a particularly busy site. The other settings are, which files not to cache such as the admin panel etc.

The next part is “Cache Preload”, by default the plugin creates the cached html pages only when someone visits them – you can pre-load them if you wish by using this section. You blog will need an XML sitemap. You can add one of these by using the Google XML Sitemaps plugin (I recommend you do this anyway). You again set here how long to keep the cached pages before they expire, the default is 3600 seconds.

Minify Settings

The settings in this section will vary from site to site because most themes will use different combinations of CSS files and Javascript files. The easiest way to create the settings for Minify is to hit the “Help” wizard button at the top of the section. This will produce a popup window where you can tick which files you want to minify, then click “Apply and Close”

I use a lot of Javascript on WPLift so I chose not to minify it incase it causes any errors. I did choose to minify my CSS and used the following options :

Database Cache Settings

You can leave the settings in here as the defaults, if you have any important pages which rely on database queries you can add them to “Never Cache the following pages”

Object Cache Settings

Again, you can leave all settings in here as the defaults

Browser Cache Settings

I want to encourage browser caching if possible as this means that for people who visited your site before, their browser will pull images and CSS files from their browser cache rather than downloading from your hosting. This appears to speed your site up greatly, I used these settings :


Now you have setup most options for the W3 Total Cache plugin, logout of your site and have a browse around. You should notice  a significant speed increase. To double check that the cache plugin is working correctly, view the page source of your site and scroll to the bottom, you should see something like this added:

[sourcecode language=”php”]
<!– Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user is logged in)
Database Caching using disk (user is logged in)
Object Caching 2236/2455 objects using disk

Served from: wplift.com @ 2011-01-06 10:56:24 –>

I will cover setting up WordPress with the CDN option in a future post. If you have any questions / comments please leave the below.

Stay informed on WordPress

Every Friday you’ll receive news, tutorials, reviews, and great deals from the WordPress space.

Invalid email address
Oliver Dale is the founder of Kooc Media, An Internet Company based in Manchester, UK. I founded WPLift in 2010.