161

Ultimate Guide to Site Speed Optimization for WordPress

In this post, you’ll find everything you need to know, to speed up your WordPress websites. Here, you’ll find the best ways to tweak and optimize your WordPress site to make it’s pages load faster.

Why bother with optimizing loading times? On the one hand, Matt Cutts of Google has officially stated that Google takes loading times into account when ranking websites. If you have a slow-loading site, that can mean lower rankings in Google and less traffic. Bummer.

Much more importantly, site speed is probably one of the most important conversion factors of any website, simply because it’s first in line. People of the tech-age have short attention spans and your meticulously designed landing page will do no good if it loads slowly and most of your visitors leave before they even get to read your headline.

A study done by KISSmetrics analytics shows that if your site hasn’t loaded within four seconds, you’re already losing 1 in 4 visitors. After ten seconds, it’s closer to one 1 in 3. If you can slash your site loading time from 10 seconds to below 4 seconds, that alone can mean an effective increase of 20%+ in traffic.

Site Speed Stats

Testing Your Page Loading Speeds

The first step in the optimization process should be a “before” test, so you can assess your site’s performance as it is, right now. The best free testing tool you can use is the one provided by GT Metrix.

Note that the tests are done for individual pages, not entire websites. I recommend that you test your homepage, your blog page (if you have one) and one or two of your larger pages and posts (one with many images and comments will be ideal). The goal is to test your most popular entry pages (your analytics program will tell you which ones those are) and some of your slowest pages, to get the best kind of data to work with.

Here’s a short video about interpreting the GT Metrix results:

 

After implementing the steps described below, I re-tested the same page shown in the video. The page-size was reduced from 831KB to 428KB, the total number of requests went from 121 to 74 and the loading time went from 8.27 seconds to 1.98 seconds, which is an improvement of 76%.

The (Non-WordPress) Basics

There are a few basics to site speed optimization, many of which are directly reflected in the feedback that you get from testing your pages with GTmetrix. You can find a good overview of those basics here: High Performance Websites.

Many of these basics are automatically taken care of, when you are using WordPress. For example, WordPress properly separates stylesheets from page content, most plugins that add scripts add them to the bottom of the page code, where they belong and many other factors will also be taken care of, given that you are using a well-coded theme.

In the following, I’ve compiled what I believe are the relevant optimization tips for WordPress, specifically, ordered roughly from most to least important.

Hosting

Your hosting provider plays a very crucial part in how quickly your pages load. Content distribution services such as the one recommended further down in this post can bring very significant speed improvements, even if your web hosting service is very slow.

Moving to a different hosting provider might be necessary to get maximum speeds, but it’s not exactly a “quick fix”. Because of this, I have not covered the hosting issue in greater detail, in this post.

I have personally tested and gotten very good results with WP Engine, a hosting provider specializing in WordPress and site speed.

 

How to Speed Up WordPress: The Conversion Factor

1) Reduce Plugins and External Calls

When using WordPress, it can be tempting to go on a “plugin binge” and load your site up with all sorts of fancy bits and bobs. Some themes also tend to be overloaded with features. In general, more plugins and more active features translate to longer page loading times. The first step in optimizing the speed of your WP site is to see if you can put it on a features- and plugins-diet.

To determine which features and plugins need to go and which ones get to stay, ask the following question: “Does this support my site’s conversion goal?”

Your site could have image sliders with 3D transition effects at the top of every page, Google maps widgets inside the posts and dynamic flickr image-galleries in the sidebar. Those would all be quite nice, but would any of them help you get better conversions?

To be able to answer this question, you need to determine what your conversion goal is. In some cases, your entire site will have just one conversion goal (e.g. visitor signs up for your product, service or membership). In other cases, you might have multiple conversion goals, but even then, you should have one main conversion goal per page. If your goals are to get people to engage with you and to get them to sign up to a mailing list (these would be typical conversion goals on a blog), then a flickr image gallery will only be a potential distraction, sending people away from your site.

With this in mind, go through your plugins list and cut the fat wherever it’s possible. Plugins that make calls to external sites are often the worst offenders, in terms of loading speeds. Also ensure that you are using only one analytics service and don’t have multiple tracking scripts loading.

 

Speed Up WordPress: Caching and Content Distribution

The next two steps are quite easy to do and require no modifications to your actual site or it’s content. Even if you do nothing else, the following will dramatically reduce your page loading times.

2) Install the W3 Total Cache Plugin

W3 Total Cache is an excellent caching plugin for WordPress. Caching is the process of storing static parts of your website, so that they only need to be loaded once, instead of on every single page-load. Caching will speed up your website and will be especially noticeable for return visitors as well as visitors that browse several pages on your site. Install the plugin and then follow the steps below for optimal W3 Total Cache settings:

In the general settings, enable page cache, database cache and object cache and select the “disk” caching method, unless you’re using something other than a typical shared hosting setup.

W3TC Settings - 1

Deactivate the “Minify” option in W3 Total Cache. I measured slightly improved page-loading times when I let CloudFlare (see below) handle the minification, instead of W3 Total Cache, so I recommend you do the same.

Here’s what the W3TC settings should look like:

W3TC Settings - 2

In the detailed “Browser Cache” settings, tick the boxes to activate expire, cache control and eTag headers:

W3TC Settings - 3

In the detailed “Page Cache” settings, make sure the option “don’t cache pages for logged-in users” is activated. This way, you will not have to switch into preview mode when you want to make changes to your template.

W3TC Settings - 4

Finally, in the general settings, deactivate “preview mode” to actually deploy W3 Total Cache for all your site visitors.

A Warning About Caching

Caching is a very effective way to speed up WordPress, but it also comes with a few drawbacks.

Depending on how aggressive the caching is, it can mean that changes you make won’t go live for a long time, for your returning visitors, unless you flush the cache. Compatibility issues with certain plugins are also to be expected.

3) Sign Up for CloudFlare

CloudFlare LogoCloudFlare is a free service that aims to help you protect and speed up your website. I was a bit skeptical at first, but after a few months of extensive testing, I have come to the conclusion that CloudFlare is nothing but awesome. You can can sign up here and get started right away. CloudFlare features the best sign-up process I’ve ever seen and the instructions are so clear that I’d be wasting your time if I added a tutorial here.

Once you’ve signed up, your site will be served through CloudFlare’s content distribution network. Your data will be served to your visitors from the node closest to them in the distribution network, which increases page load speeds. In addition, CloudFlare identifies and keeps track of spam bots and malicious scripts, reducing the risk of your site getting hacked, reducing spam comments and saving bandwidth (in my case, bandwidth consumption is reduced by almost 50%).

On the settings screen for an individual domain in your CloudFlare settings, you can leave many of the options in their default settings.

Activate the minification of HTML, CSS and Javascript:

When you minify code, it simply removes the unnecessary white-spaces and line breaks, so that a browser can parse through all of the code more quickly. Here’s an example of one simple style element in CSS:

 #signupform {
width: 720px;
clear: both;
float: left;
background: #f6f3bd;
border: 3px solid #f4c14b;
padding: 20px 40px 0 40px;
margin: 44px;
} 

As you can see, that’s nine lines of code and a total of 145 characters, including all the spaces. The minified version of this bit of code would look like this:

 #signupform{width:720px;clear:both;float:left;background:#f6f3bd;border:3pxsolid#f4c14b;padding:20px40px040px;margin:44px;} 

Now, the code is reduced to just one line and 123 characters. Minifiying all of a website’s code can save hundreds, if not thousands of lines of text and make it that much more efficient for browsers to download. The only reason code is not written like this in the first place is because then it would be almost impossible (for a human) to keep an overview over what’s going on.

RocketLoaderAs I’m writing this, the Rocket Loader feature in CloudFlare is still in beta. I activated it and tested my site in all major browsers and since I could not detect any issues, I kept it activated. This feature sets up all of your javascripts to load asynchronously, which simply means that the rest of the page content doesn’t have to wait for the javascripts to load, before it can display and your visitors will be able to view your content, even if scripts are still loading in the background.

Remember to switch on the “Development Mode” (bottom of the settings page) whenever you want to make changes to your theme settings or edit your CSS, otherwise you won’t see the changes on your site, right away. After changes are made, click the “Purge Cache” button to make sure all visitors will see the updated version of your site.

 

Image Formats and Compression

Images are usually the largest files on a web-page and as such, they contribute to long loading times. Here are the steps you can take to optimize your images.

4) Solve the Gravatar Problem

As you saw in the short video at the beginning of the post, one of the big speed-issues on my example page was Gravatar. Gravatar is the service that automatically adds the avatar images next to the comments. A simple solution would be to deactivate avatars completely, but that will probably make your comments section look a bit bleak. Plus, the avatars help keep track of who’s saying what in discussions, so they are more than pure vanity.

Blank GravatarA better solution is to set the default avatar to “blank”. This way, users who have set up an avatar will still get it displayed next to your comment, but users without a Gravatar associated with their email will get no avatar showing up, instead of one of the default avatars. With default avatars activated, your site needs to make an external call to Gravatar for every single image displayed and this can be a real speed killer.

A third option is to add your own default avatar and host it on your site. To do this, open your functions.php file and add the following code:

 add_filter( 'avatar_defaults', 'newgravatar' );
function newgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/YOURICON.png';
$avatar_defaults[$myavatar] = "CUSTOMNAME";
return $avatar_defaults;
} 

Upload your own image for the new default gravatar to the folder of the theme that you are using (/wp-content/themes/yourthemename). In most themes, there’s an “images” folder that you can use. Change “/images/YOURICON.png” to the path and filename of the file you uploaded. Also change “CUSTOMNAME” to whatever you want to call your new default avatar.

Even if you simply upload the default “Mystery Man” icon and have it loaded from your own server instead of from the Gravatar servers, that will already speed up your site significantly (that’s what I’ve done on this site).

5) Choose the Right Image Format

The two best image formats to use online are JPEG and PNG. As a general rule, JPEG is better for photographs and complex images with many colors and PNG is better for images with sharp contrasts, lines and text. Also, PNG allows for transparancy in images, while JPEG does not. JPEG is a “lossy” compression format, meaning that you can reduce the size of an image, but it will be noticeable, as the image quality is also reduced. PNG is a lossless compression format, but can’t reduce complex image sizes to the degree that JPEG can.

PNG or JPEG for Images

When in doubt, you can always produce an image in both formats and compare quality and file-size side-by-side. Note that JPEG is not a “working” format, since every time you save a JPEG file, it gets re-compressed and the quality diminishes slightly.

6) Image Optimization with TinyPNG and smush.it

To further reduce the size of your images, you can process your PNGs with TinyPNG. TinyPNG does a lossy compression, but it does it amazingly well. It will often reduce image sizes by up to 70%, but the difference in quality is almost impossible to detect, even when comparing images side-by-side. I highly recommend running all your PNG images through TinyPNG before uploading them.

Another option (that also works for JPEG) is the WP smush.it plugin. This plugin will automatically run any image you upload through Yahoo’s smush.it, which is quite an efficient, lossless image compression service. I did not manage to find any visible difference between smushed vs. un-smushed images, even though smush.it will usually reduce image sizes by anything from 5% to 40%+.

smush.it example

Smush.it can slow down your image uploads and it doesn’t work with all hosting providers, but it’s worth a try.

7) Lazy-Load Your Images

This step is only relevant if you use many images in your posts. It can also be useful if you have thumbnail galleries displaying in your theme (e.g. related posts and recommended posts list with thumbnails). You can install the jQuery Image Lazy Load plugin to improve the browsing experience on your site. With this plugin activated, only the images above the fold will load (i.e. only the images visible in the visitor’s browser window), when a new visitor arrives at your site. As soon as they start scrolling down, the images will load, just before they come  into view.

This will not only speed up your page loads, it can also save bandwidth by loading less data for users who don’t scroll all the way down on your pages.

8) Use Image Sprites Instead of Separate Images

NOTE

This step requires quite a bit of messing wih code and it’s more complicated than any of the other steps in this guide. You’ll find that most well-coded themes will already use sprites wherever possible. However, since I personally saw significant speed improvements after manually “spriting” a few of my images, I wanted to include this method as well.

Images used in static elements of your site (background images, header, footer and sidebar images) should ideally be combined into sprites. This means that instead of loading many individual images, you load just one image, containing all of the graphical elements. Then, you specify which portion of the image to show for each graphical element.

Sound confusing? Here’s a simple example: many blogs have some “follow me” type social media buttons, linking to the site owner’s twitter, facebook and other accounts. Let’s say I want to display five such buttons in my sidebar and I’d also like each button to “light up” when you hover over it with the mouse cursor. To set this up, I’d need to upload 10 individual images (one normal and one lit-up version for each of the five buttons).

A much better alternative is to combine all of the ten images into one single sprite like the one on the left. There are three advantages to this. The first is that the image with all the buttons combined is slightly smaller in data-size than each of the images added up. The second advantage is that using sprites requires less code on your site, than using individual images. The third one is that now, when someone visits your site, only one single image needs to be loaded, instead of ten separate ones. The fewer individual elements need to be loaded, the faster your website is.

To find out exactly how to to do this, I recommend you read this detailed guide on creating image sprites.

To automatically create a sprite for your background images, you can also try this tool.

 

Database Optimization

The size and structure of your database can also affect your site’s performance. Here are my two recommendations for taking care of your database:

9) Install the Revision Control Plugin

Left to it’s own devices, WordPress will store every variation of every post or page you’ve ever created. When you’re writing a post, every time you click on “save draft”, the current version will be stored indefinitely. Even if you just edit a post to fix one simple typo and then update it, you’ve now got two versions of that entire post stored in the DB.

Revision control fixes this. I recommend that you set it to store a maximum of two or three revisions per post or page. That way, you still have something to fall back on, in case you make a mistake, but your database isn’t unnecessarily bloated with dozens of stored revisions.

10) Install the WP-DBmanager Plugin

WP-DBmanager is a plugin that can backup, optimize and repair your WordPress database. This makes it useful for security purposes as well as helping you keep your database lean and mean.

In the “DB Options”, I recommend that you set it to automatically optimize your database every 2 weeks to every 2 months, depending on how often you update your site with new content. Also set it to automatically back up the DB every once in a while.

Database Optimization

Testing Your Results

Once you’ve implemented any or all of the changes recommended above, re-test your pages with GTmetrix. Also test your site in every major browser, to check all of your pages and all of your site features. In my experience, especially Javascript powered features seem to be prone to conflict with certain plugins and settings.

You can use Browser Shots to test how your site renders in various different browsers. Before testing, flush the cache in both W3 Total Cache and CloudFlare, to ensure that all of your latest settings are in place for the test.

If you have any questions or additional recommendations, I’d love to hear about them in the comments! I’d love to hear about your experiences/results with using this guide to speed up WordPress sites of your own, as well.

0
Shares
Shane
 

I'm Shane Melaugh and I'm the guy writing most of the posts on this blog. My goal is to provide you with useful, straight-forward insights on how to grow your business by creating compelling offers, driving traffic and increasing conversions.

Click Here to Leave a Comment Below 161 comments
Peter Sundstrom - August 2, 2011

Some very good and well researched information there Shane.

In particular, W3 Total Cache can make a huge difference.

I originally used WP SuperCache, then I used QuickCache, but switched over to W3 Total Cache a few months back after my testing showed it was at least 20% more effective than QuickCache.

That said, W3 Total Cache can be a little complicated to get all options set up. I found a few of my sites got totally screwed up with Minify switched on, so I had to disable it on those sites. Even with Minify disabled, the other cache settings are still very effective.

Haven’t used CloudFlare yet, but definitely something I’ll give a go.

Cheers

Peter

Reply
    Shane - August 2, 2011

    I’d used WP SuperCache previously as well, but wasn’t too happy with it. W3TC has an intimidating amount of options, but it really gets the job done.

    Reply
Michel Rossier - August 2, 2011

Great post! I did try cloudflare recently, but I am not sure if that would work for a membership sites (with protected areas), do you have any experience?

What drastically improved my load speeds as well, was uploading all my static files to Amazon S3, i think that can be done in W3 plugin almost automatically.

Another improvement is to delete all unnecessary image-definitions in your css file. For example I don’t use the “portfolio” feature of my theme, so i deleted all the CSS-declarations relating only to that feature; result: less http requests and less images/icons to load.

Reply
    Shane - August 2, 2011

    Hi Michel,

    I haven’t activated CloudFlare for any of my membership sites. I don’t know if it would work, but neither do I see a reason why it shouldn’t. After all, it works on a WordPress site, which also comes with a “membership component” in the form of the admin backend.
    I like the idea of stripping out unneeded CSS. I could probably cut the size of the CSS file for this theme in half…

    Reply
      Michel Rossier - August 2, 2011

      Thanks for your feedback. My concern is, that cloudflare is caching files, so would it drop the authentication process, like it happens if W3 is turned on (at least that happened on my site)? But you’re right, WP has an admin area, so it has to somehow support the authentication process.

      Reply
      Shane - August 2, 2011

      Hey Michel, I asked CloudFlare support about this. They say that membership sites will work through CF as well.

      Same for split-testing, which I also asked about. Certainly worth a try.

      Reply
      Michel - August 2, 2011

      That’s good news, dankeschön! Well, then I’ll give it a try on my new membership site. I was fighting against slow loading times of hostagator the last two weeks, and now this week, after switching to mediatemple.net, I have again problems, which are clearly related to the hosting and not the wordpress.

      Reply
OG - August 2, 2011

Hi Shane,

Once again, pretty useful information from you. I have to say, it is such a pleasure getting your e-mails. When I see I have an e-mail from you, I know, that you will have something informative to say. I know, I will learn something if I open your e-mail.

I just finished my 3rd month since I decided to look into IM as my home business.
And after 3 months, probably 1000’s of e-mails of many “friends” trying to sell me something. I have discontinued the subscription to most of them. It was interesting to see, how they started with useful information and then quickly turned into daily e-mail pushing.. for products, sometimes useless products…

You are the exception, and a true gem in this IM world!

Thanks!

Reply
    Shane - August 3, 2011

    Thank you very much! I’m happy to be of some use and I agree that the signal-to-noise ratio in IM is pretty bad, in general.

    Reply
Uwe Marx - August 2, 2011

Hi Shane,
I always frowned on the loading speed of WP and would have loved to stay with “conventional” HTML sites; but who can resist the ease in creating a web site using WP, not to mention all the fantastic free/paid plugins which are available.

Your guide on speeding up WP could not have come at a better time for me, since I have an upcoming project and can incorporate this right from the beginning.

I have been using Weebly.com for a while now, it’s seems faster as WP but I can’t recall the CS behind it. It is easy and fast and not bad at all.

For my new project I want to give WP a shot and use all the plugins again I bought in the past. Seems such a shame just having them sit around on my HD ;)

Thanks again for your great post,

Uwe

Reply
    Shane - August 3, 2011

    Hi Uwe,

    It’s one of the downsides of a database-driven system, I think. However, well-coded and optimized WordPress sites can load in a snap, so you can have the best of both worlds, so to speak.

    Reply
Patrick - August 2, 2011

Wow, Shane!

What an informative and useful post. It’s going to take at least a couple more read throughs and implementing suggestions to see what improvements I can get.

I’ve just done a check for one of my website homepages that is designed primarily for Amazon sales. I’ve got a page speed grade of 86% and a YSlow of 75%, page size 302kb and 3.24s to load.

Room for improvement, but it’s not dire. I think the quick side is due to using a ClickBump WP theme, which is well coded for speed, but the slow side is due to the many Amazon images (19) that I have.

A lot of the results are 100% green, but three items – images and browser caching – are under 40%. Your great article has given me the path to fix these, although I’m not sure if the images that link to Amazon are something that I can fix, which look like the slowest part.

Thanks,

Patrick

Reply
    Shane - August 2, 2011

    ~3 seconds is pretty good, I’d say. With the images, just by using smush.it, you’ll be able to reduce their size somewhat and maybe shave another half-second off of the loading times.

    Reply
      Patrick - August 3, 2011

      Yes … but you clocked under 2 seconds for a bigger page! I’ll try Smush first.

      I have to say, it is refreshing to read information I haven’t come across before – let’s face it, most stuff is rehashed and reposted endlessly.

      I was unaware of Smush, GT Metrix, CloudFlare and the Gravatar problem, which is quite a lot, when I usually get one thing at the most from articles and even eBooks. You’ve obviously done some in depth research … a benefit of not spending your time on other things? I read your Sunday email :-)

      Reply
      Shane - August 3, 2011

      Haha, yes, that probably has something to do with it. I did get quite a lot of testing done, thanks to not being distracted.

      Reply
Eric Transue - August 3, 2011

Excellent post Shane. I’m going to implement many of the tips you provided above on my own site. I’ll be sure to return and let you know how it goes.

Reply
    Shane - August 3, 2011

    Hi Eric,
    Thanks for your comment. I’d love to hear how the steps above worked for you. Maybe some before and after GTmetrix scores? =)

    Reply
Olivia - August 3, 2011

Another fine piece of helpful information. I had begun the Cloudflare setup process awhile backand got sidetracked somehow. Saw your post on FB and, with your help, I was able to complete the process.

As usual, you rock!
Olivia

Reply
Cipta - August 3, 2011

Thanks Shane for another great post!
Currently I’m struggling with the speed of my pages, they are either very slow to load or doesn’t load at all (it took forever to load)!

Many posts that I encountered out there are all very techie, and doesn’t really point me to the right direction (yours is full of “what to do” and “how to do them” stuff).

A similar service other than CloudFlare is Incapsula…I tried them both, and like them both. People would surely benefit from these kinds of services.

If you have the budget, use a VPS web hosting package/Dedicated Server package instead of the shared hosting package. Just thought some people might benefit from this.

Thanks again Shane!

Reply
    Shane - August 3, 2011

    Thanks for your comment!
    Didn’t know about Incapsula. Google has recently launched a service like CloudFlare as well, for speeding up sites. In initial tests, CloudFlare has shown to be a bit faster than the Google version, though.

    Reply
Ben Wan - August 3, 2011

Hi Shane,

Thank you very much for such a remarkable and very actionable post here.

I’ve tested GT Metrix on my site, and found out that it way too slow, so I have some work to do with my site and I’m going to check out cloud flare.

So, I’ve started to do some maintenance on my site like, I’ve disabled some plugins and deleted them, try the blank gravatar, but didn’t like an empty square there, I’ll have to try the function code you’ve given. But then I wonder if some WordPress themes are more efficient with speed than others, or it really doesn’t matter if you’ve got caching?

Ben

Reply
    Shane - August 3, 2011

    Hey Ben,
    The theme you use has a lot to do with how fast the site loads. That’s the main problem on this site, as well. I love everything about the theme I’m using, except that it’s extremely slow, when not optimized.
    If the theme is badly coded, that can slow things down considerably. Also, if it’s image-heavy and it doesn’t use sprites for the background images etc…

    And I’ve tried themes in the past, that were even worse. Now that you mention it, I maybe should have added this to the article: consider switching to a faster theme.

    Reply
      Joe - August 3, 2011

      Hi Shane

      Being a novice at this how do you go about finding the loading times of themes before you buy or is the loading time listed somewhere in the specifications in all themes.

      Is there a ‘sweet spot’ for loading times to aim for?

      Reply
      Shane - August 3, 2011

      Hi Joe,

      To test a theme, simply test their demo site. Practically every theme comes with a live demo where you can see the theme in action. Just grab a few of the demo pages and run them through GT Metrix.

      However, you should mainly pay attention to the scores and only secondarily to the actual loading times. The reason for this is that I’ve often seen theme demos hosted on extremely slow servers. If the theme is well coded, you’ll see that it makes few requests, doesn’t load excessive images etc.

      As for a “sweet spot”: faster is always better. I’d say that anything below 2 seconds is great. Someone who doesn’t wait for 2 seconds for a page to load, would probably not have been a very engaged user, anyway. If a site takes more than 3 seconds to load, I’ll go back and tweak some more. :)

      Reply
Mervyn - August 3, 2011

Hi Shane

I amazed at your productivity and the high quality you put out.

I have one question:
What theme are you using on this site?

Thanks for this very helpful information

Reply
    Shane - August 3, 2011

    Hi Mevyn,

    I’m using the “Striking” theme, found on themeforest. It’s a great theme in many ways, but the loading times were extremely bad, before I optimized it. For a while, I was seeing 10+ second loading times…

    Reply
George Kedourie - August 3, 2011

Hi Shane

Thanks!

Excellent Post.

I have been using W3 Total Cache on all my sites and client sites, for over a year now and had not quite figured the best settings, so am really glad for your advice on that as well as everything else you mention!

Best

George

Reply
Isabel - August 3, 2011

Hi Shane, as usual you deliver some ‘pretty amzing’ content. Thanks again ;-)

I have to say, I have been researching online on this particular subject and bookmarking some sites for quite sometime now, and yours is ‘so clutter free’ and well detailed, that I believe anyone needing help… will not have a problem here.

I will go through the steps now as I noticed a couple that now makes sense to me and try them out.

Cheers for this info…

Reply
Rose - August 3, 2011

I tested my site on gtmetrix and it said it loaded in 2.4s. But when I tested with http://www.webpagetest.org (which google recommends on their blog), it said it took 3.995s.

I personally thing it’s easier to diagnose problems using webpagetest (which is also free to use). If you click on the waterfall image it produces, it tells you in detail the time it took to load each specific element, so you can see at a glance exactly what is slowing you down and eliminate it.

On my site it was google plus one that was the culprit.

Reply
    Shane - August 3, 2011

    Hi Rose,

    Each website speed tester will get a slightly different result, because they go through different connections and connect from different locations. That’s nothing to worry about. :)

    Reply
Tom - August 3, 2011

I have been using WP Super Cache on most sites and I am pretty happy with it. Since I have heard of W3 Total Cache my new sites are fantastically quick. I have heard that it is really difficult to uninstall WP Super Cache, and when I did I have actually lost one off my sites on Google.

Does anyone know of a video or something that will show the process on uninstalling?

Reply
Thesis - August 5, 2011

Hi Shane

I am really delighted and upset with your Sunday emails (while writing this I got another thought provoking email from you) and now I need to allocate some “Shane provoked activities” into my schedule.

This post was one of those. I had the page load time review for my sites on the to do list for a while and never got to it. After reading your post I had to, and was amazed with the room for improvement I found. Thank you very much indeed.

A couple of shares from my side:

First of all, for anyone using the http://mysite.com instead of http://www.mysite.com as their primary link beware that Cloudflare has issues with this and you need to spend time with .htaccess and DNS configurations. I couldn’t get my sites that use the direct http://mysite.com to work with Couldflare though I understand it is possible.

Here is a link to their support forum for anyone who wishes to explore it further. (And if you find an easy way then please post here).

http://support.cloudflare.com/discussions/questions/259-redirect-to-www

Regarding your GrAvatar tweak, I think it’s a good idea, however, I usually avoid tweaking php of themes because I have semi automated the upgrade process on my sites and risk loosing the tweaks (and not realizing that they were overwritten) by an auto update.

One tweak to add to the list could be for those who have Cpanel/Apache you can turn on gzip compression which I was surprised to find disabled for my sites.

Thanks again, now I’m off to read your latest post :-)

Thesis

Reply
    Shane - August 8, 2011

    Thanks for pointing out the redirect issue. I personally do exactly that – redirect from the www to the non-www versions of my sites. I’ve had no issues at all with CloudFlare, though… I wonder why that is.

    Reply
Craig Sowerby - August 5, 2011

Hi Shane,

I am a plugin lover and my sites show that with slow loading. So I will have to bookmark this page and take notes and get my site running smother!

I have way too many plugins and some I don’t even use. Do you know if they hold a car boot sale anywhere for disused plugins?????

Craig

Reply
Shaun Baird - August 6, 2011

Hi Shane, brilliant tips, thanks.

I wonder if yuouve tried the amazon s3 INSTEAD of cloudflare for the CDN aspect of the w3 plugin?

I use amazon s3 CDN exclusively, and while I dont mind switching all my sites to cloudflare if its quicker, I just wondered if youd ever compared the two, or know if one is slower than the other?

Thanks
Shaun

Reply
    Shane - August 6, 2011

    Hi Shaun,

    No, I have not tried the Amazon CDN myself, so I can’t say if there’s a performance advantage to using CloudFlare instead.

    Reply
Emmanuel - August 8, 2011

Congratulations for this -once again- excellent piuece of work.
Once again, you did an astounding work of finding, testing, sorting and presenting in one single place and in a very clear way what has to be know on a hot topic.

I wouldn’t say that your post came just at the very moment where I was looking for ways top speed up my websites, because as a webmarketer I am ALWAYS looking for ways to speed up my websites, so the coincidence may not be so much striking ;-)

But I put it in action at once, picking up 2 wordpress websides of mine, and here are my conclusions after about 1 week.
Note : I didn’t suppress any plugins on them, and didn’t do the suggested gravatar and sprites improvements.

For the busy readers, I’d start with my conclusion :

Operation succeeded,… but patient died.

1st Website (autoblog, so the measured page has changed between the 1st and the 2nd measurement) :

Before :
Page Speed Grade : C – 73 %
YSlow Grade : D – 63 %
Page loading time : 3.21 s
Total page size : 894 KB
# of requests : 70

After :
Page Speed Grade : C – 77 %
YSlow Grade : C – 74 %
Page loading time : 3.91 s
Total page size : 837 KB
# of requests : 59

Conclusion : most impact happened on YSlow (11 % improvement), but the DL time increased from 3.21 to 3.91, despite a global page weight smaller (837 vs 894 for the former post), and a # of requests significantly smaller as well (59 instead of 70).

2nd website (same page measured before – after) :

Before :
Page Speed Grade : C – 78 %
YSlow Grade : D – 69 %
Page loading time : 2.42 s
Total page size : 1.01 MB
# of requests : 64

After :
Page Speed Grade : B – 83 %
YSlow Grade : C – 77 %
Page loading time : 5.31 s
Total page size : 975 KB
# of requests : 65

This one came as a mystery, as the DL time, after improvements, is allmost 3 s more.
Another ‘After’ measure launched again a few minutes later might brings a solution hint :
DL time : 5.79 s (Ouch !)

I only see one explanation to this : the hosting.

Both websites run on a shared hosting and I stronly suppose that the cuplrit(s) are the other tasks run by the other websites on the same server, who impact heavily on the response performance.

As a conclusion :
– as long as those websites will stay on this hosting, I will follow the ratings (A, B, C,…) even if I see an increase in the DL time, becaise they are objective and not circumstances dependant
– looking closely, I saw a VERY important part of the loading time being taken by advertising calls. This questions heavily again the value of a few euros a day (when not cents only, for some websites) vs the lost in visitors caused by increased DL times

Would anybody be interested in running similar tests on a dedicated hosting ?

Hoping this feedback might help, and thank you again Shane !

Reply
    Shane - August 8, 2011

    Hi Emmanuel,

    Thank you for the detailed report!
    First of all, I realized that I need to add a note or maybe an extra module to this post, about hosting. Hosting matters – a lot – if you aren’t using CloudFlare (which I assume you weren’t). With CloudFlare, it doesn’t much matter where your site is hosted, but without it, the hosting can always be the greatest bottleneck. Especially with shared hosting, page load speeds may vary, depending on the current load on the server.

    A few more comments:
    – I’d suggest examining the waterfall analysis for your pages. Especially the one that’s taking almost 6 seconds to load. I suspect that there are just a few elements slowing down the entire site. Remember that when I started out, I had page loading times of 10 seconds and above and even after some optimization, the loading times were damn slow. But eventually, I managed to get things speeding along quite nicely. So all hope is not lost. :)

    – If it’s ads that are slowing down the site, see if you can have them load asynchronously (aka lazy-load). Here’s a script that could help with lazy-loading ads.

    – Re-run the tests a couple of times. The results are never exactly the same and if you register with GTmetrix, you can even get a “history” view to see how each test compares to the ones before. This can give you a good idea of what range of loading times your pages are in, even if the results vary from test to test.

    Reply
Alex - August 8, 2011

Excellent in-depth article. I’m currently in the process of rolling out performance improvements like Cloudflare and cofiguring W3 cache better on a few sites. Thanks!

Reply
Alex - August 10, 2011

Great information, I knew about 3/4 of the tips you shared but the additional 1/4 that you shared made a very noticeable difference. In particular using cloudflare to minize instead of w3 total cache actually did do a good ~-1 second loading difference for the 5 websites I tried it on. I was already using cloudflare but I guess I was using the basic settings and I should of explored the more advanced stuff :). I also was not using the browser cache before, I guess that also helped!

I wanted to do a post on my blog about speeding up wordpress based websites since it has been a big concern for me since the end of 2010 and I will definitely mention your post and credit you for the improvements you shared.

Reply
Andy - August 11, 2011

Shane, thanks for this great post. It came at the right time as a couple of my sites are just ‘chugging’ along when hit on in Google.

Cheers,
Andy

Reply
    Andy - August 12, 2011

    Shane,

    I was already using cloudflare on one site to test and in the last few days added a further site. But today neither of my sites are visible or am I able to login due to ‘502 Bad Gateway’ error messages for both sites…!

    As I’m not a techy with hosting and coding etc, I think I’ll just stick to losing a couple of visitors if my site is opening up a bit slow! Better that than no site at all I guess.

    That being said Shane and again, thanks for this great post – the sites I uploaded the W3 Total Cache plugin to yesterday are now operating much more efficiently.

    Thanks,

    Andy

    Reply
Ivan Bayross - August 15, 2011

Hi Shane,

I have never been disappointed reading your posts. They have educated me and made me so much better at working with WordPress.

There is a beautiful simplicity and clarity in your writing / explaining style.

There is information for those who have strong coding skills and newbies.

Thank you.

Regards,

Ivan Bayross

Reply
    Shane - August 15, 2011

    Hello Ivan,

    Thank you for your comment! I’m very happy to get such positive feedback from you. Very motivating. :)

    Reply
shahrukh - August 16, 2011

Thanks for writing this useful post. My site now loads way faster than before. Thanks Again.
Kindly if possible please share some insight about these wordpress theme frameworks like iThemes’ Builder, Thesis, etc.

:)

Reply
Alexander Umanets - August 19, 2011

Hi Shane,

Regarding CloudFlare.com: you didn’t mention about 3 things:

1. By default in W3 Total Cache Plugin/Minify Tab/HTML & XML settings -> HTML minify settings is not checked. Do I need to check it out?

2. Do I understand it right: I have to switch on the “Development Mode” (bottom of the settings page) on my site’s CloudFlare Settings page, not in W3 Total Cache settings page?
If so, I have to remember to open my CloudFlare account each time I do changes on my WP site, right?

(The reason I am asking because it takes 1-2 days for domain registrar to update my DNS settings to point them to CloudFlare servers, so I was not been able to see Settings page on my CloudFlare Account now yet.)

3. You didn’t mention CloudFlare WP plugin. My understanding is that you want to install this plugin in addition to my website registration with CloudFlare to ensure my WordPress blog is running optimally on the CloudFlare platform. What is your?

Reply
    Shane - August 19, 2011

    1. No, I use only the CloudFlare minification.
    2. In W3TC, make sure that it’s set to not show the cached versions to logged in admin users (in the “Page Cache” options), so that you only have to switch CloudFlare to dev mode when making changes. And remember that this only applies to changes made to static parts of the site.
    3. I’ve actually read two contradictory notes about this. One said you don’t need both, the other said to keep using both. It seems that the current advice is to keep using the CloudFlare plugin along with the W3TC plugin.

    Reply
Alexander Umanets - August 19, 2011

Regarding your recommendation about WP smush.it plugin. I was in doubt to use it because:
1. It is another plugin to add to WP (which is not good for site’s speed)
2. It calls third party site to do something on my site (which is also not good for site’s speed)

So, I found similar plugin that doesn’t use third party for image optimization:
CW Image Optimizer plugin that is based on the WP Smush.it plugin.

Here is description:

The CW Image Optimizer is a WordPress plugin that will automatically and losslessly optimize your images as you upload them to your blog. It can also optimize the images that you have already uploaded in the past.

Because CW Image Optimizer uses lossless optimization techniques, your image quality will be exactly the same before and after the optimization. The only thing that will change is your file size.

The CW Image Optimizer plugin is based on the WP Smush.it plugin. Unlike the WP Smush.it plugin, your files won’t be uploaded to a third party when using CW Image Optimizer. Your files are optimized using the Linux littleutils image optimization tools (available for free). You don’t need to worry about the Smush.it privacy policy or terms of service because your images never leave your server.

Reply
    Shane - August 19, 2011

    You don’t need to worry about that, actually. smush.it makes the external call only once, right after you upload an image. The image is then replaced with the newly optimized one. When people load your site, there are no external calls made and the plugin is inactive when you aren’t uploading new images. So, it won’t slow down the performance of your site at all.

    I will test the other plugin you mentioned, though. I want to see which one is better at reducing image size.

    Reply
Alexander Umanets - August 19, 2011

Here is an interesting post regarding new Google Page Speed Service:

http://www.jacoballred.com/web-dev/is-googles-new-page-speed-service-worth-it/

Shane, take a look to know the answer…

Reply
Alexander Umanets - August 19, 2011

Just tried to use Cloudflare on my new blog and minify function didn’t work properly – the blog lost all background images and proper formating and was looking as old style website screen-wide on white background with sidebars at the bottom of the site. And when I anable W3 Total Cache minify then everything is OK.

I use free simple WP theme on this site. The CloudFlare Minify function is in Beta now, so maybe there is some issues yet.

So, it was unsuccessful experiment for some reason.

Reply
    Shane - August 19, 2011

    Yeah, that’s why testing is so important. Some settings mess around with some of my other sites as well. It seems to be mainly the minify options that do this. You can always fall back to the W3TC minify options as an alternative.

    Reply
Leo - August 31, 2011

Hi Shane

Thanks for such an informative article.

The problem I have using GTMetrics is that the Page Load Time can vary from under 3 seconds to over 11 seconds – without my changing a single setting in either Cloudflare or W3TC.

I’ve run successive tests made one after the other, and also allowed some time to elapse. Nothing makes any difference – the Page Load Time continues to fluctuate wildly.

This makes accurate testing changes to my settings near-on impossible.

Strangely, the YSlow and PageSpeed ratings do not change – the % and grade remain the same. Only the Page Load Time varies.

Any ideas what this could be caused by?

I’d much appreciate your help.

with kindness,

Leo

Reply
    Shane - August 31, 2011

    Hi Leo,

    Thanks for your comment!
    3 – 11 seconds is a huge range. I’m surprised at that. I also see fluctuations from test to test, but in the range of +/- half a second or so. There’s also a “history” tab if you create an account and re-test a page several times, so you can see how the loading speed develops over time. For my pages, there’s always a very clear average, even when there are small fluctuations.

    The % scores don’t change because those analyze the components on your page and check whether those are optimized for speed or not, but they don’t take the actual loading speed into account. It’s like checking the on-page SEO factors and giving them a grade, regardless of where the page ranks in Google (which does make sense, in the right context).

    Two recommendations:
    1) Test a page of yours on WebPagetest, to get a second opinion. See if there are the same fluctuations there.
    2) Get the free test done on Zoompf. They uncover more stuff than any other service I’ve seen and you can get at least one free analysis. Maybe they’ll highlight something the others are missing.

    Finally, if it’s the very first step in the process that is slowing the site down, i.e. it takes a long time for the server to respond with the first bit of data, get in touch with your hosting provider. Don’t know for sure, but it could be a hosting issue.

    Reply
Leo - September 3, 2011

Hi Shane – and thank you so much for your detailed reply. I am interested to notice that the confidence you inspire in me through this level of service encourages me to invest in your products. A good point for all Internet marketers as integrity and reliable information is, in my experience, at such a premium online.

I checked the speed testing sites you recommended. Very helpful – and I can see why you go for GTmetrics first.

You are correct in thinking that the first line in the analysis is taking the most time to load. Without CloudFlare, this points to my server. But with CloudFlare activated it points to them.

So is CloudFlare itself sucking time, or is this still a server issue? Hmmme… Any pointers would we most welcome!

I’d missed the “history” tab and this is indeed very useful. Since I first wrote, the speed fluctuation has settled down significantly, possibly to do with some tweaking of the W3TC settings. Mostly it now fluctuates in the 3-4 second area. But it can still range from under 3 secs to a couple of whopping spikes of 22 and 24 seconds.

* As you have been so kind to help me on this, another bit of information that I discovered recently may help some of your other readers. My visual editor began operating only in html. The fix was to uninstall the “BulletProof Security” plugin. Deactivating was not enough. I had to completely uninstall to get my editor back.

A small point but something that may help someone someday.

with kindness,

Leo

Reply
Paul Tomlinson - September 22, 2011

Shane, thanks for the tips. I’m going through them now while at the library and although I cannot access hostgator to change the server settings, I am already seeing decreases in load times based on some of the other tips that you have provided.

I sorely need this! The reason why I say that is because I’m in a niche where I should be seeing a good uptick in traffic. My site (although it does have catalog info) is loaded with 100% unique content. I’ve seen traffic fall about 70% over the last 4-5 days or so. So. thank you. Speeding up the site may do the trick.

Reply
Rajesh Namase - September 28, 2011

Your speed tips help me a lot, thanks for posting such helpful article.

Reply
Shawn - October 16, 2011

Shane, quick question. I installed Cloudflare on my host Media Temple and not through the Total Cache plugin. Do you see a problem with this? What about the development mode, since my cloudflare is already activated I did not add it to the total cache plugin or should I just add it? Thanks this was really informative.

Reply
    Shane - March 25, 2012

    Hi Shawn,

    I don’t know how the host-level integration of CloudFlare works, I’m afraid.
    I’m assuming you still have to add the domains to your CF dashboard? If not, then I have no idea. If you can add them to your dashboard, then I’d say go ahead with connecting it to the plugin, as well.

    Reply
Gacek - November 8, 2011

Hi Shane!
Thanks for this great guide. It helped me to optimize one of my client’s website. Almost 50% speed gain! Yaaay, thanks man!

Reply
James Hussey - December 3, 2011

Shane – great guide on page speed. I haven’t sprited anything except my 7-up, but most of the other things you mention I’ve done and use MaxCDN over CloudFront. The reason being that CloudFront couldn’t help me fix a number of errors their integration caused at my blog, various plugin crashes – they weren’t helpful on that.

I didn’t notice they sped my site up, either – I tested with various tools (Pingdom tools, Google’s PageSpeed online, the SEO Doctor plugin from Prelovac and another place, forget where).

With MaxCDN and the W3TC, I’ve noticed and clocked major improvements. It may have just been a support issue.

Anyhow, appreciate the insights (i.e. various plugins you recommended, and the Gravatar issue: I just disabled Gravatar on mine and miss the talking heads).

Reply
    Shane - March 25, 2012

    Hi James,

    I’ve heard good things about MaxCDN, although I’ve never used them myself. Actually testing before-and-after is definitely very important, as results can always vary.

    Reply
Tushar - December 25, 2011

I am using W3 total cache from past but never check that minify option. Today I read this post and see the result of that option . Really it increases my blog speed. Thank you!!

Reply
Rigo - January 4, 2012

Hi Shane,

Thanks for this great post :) I didnt know about CloudFlare and Smush and have to say the two services changed my website load time in a way that I wasn’t imagining.

Sorry for the poor english as I am french :s lol ;)

Ok, take care and many thanks to you.

Reply
    Shane - January 5, 2012

    Glad to hear you got these results. It’s nice having a faster-loading site, isn’t it? :)

    Reply
Jim - January 12, 2012

Great tutorial, Shane. I got the link to this on another forum so your “fame” is spreading.

Some notes about Hosting. This is the first place to look, in my opinion. Many hosts, of not the majority, are into “throttling” these days as a way to bump users to higher cost plans. “Unlimited”, as they hype, is certainly not. I learned this the hard way. I wondered why my hits had been dropping over the last 6 months and my revenue with it. I estimate I have lost about $1,000 in commissions. Grrr! Even my Adsense revenue is off by about 25% compared to last year.

My WP blogs were loading slower and slower or not at all. I contacted support and we dug into Cpanel. That is when my host (Hostmonster) said I had too many files, too many tables, and too many queries and admitted I was being throttled. For those who don’t know, throttling is them automatically slowing you down to give other users equal access to servers.

Before I go looking for a new hosting company, I am in the process of deleting unused plugins right now. I already went through and deleted themes I had no intention of using and cleaned up the code a bit. I even deleted some old HTML and WP sites that were not generating any revenue.

After I clean my own house, next steps will be to implement your suggestions and see what happens.If I am still being throttled and/or load times don’t improve, I will start hunting for a new host.

Sorry for the length of this comment but I thought my drama with hosting might benefit your readers.

Cheers!

Reply
    Shane - January 16, 2012

    Hi Jim,
    Thanks for your comment! You make a good point, regarding “unlimited” hosting plans. It’s true that they are nowhere near “unlimited” in any sense of the word and installing many sites on one account or getting lots of traffic to a site can quickly incur limitations.

    Reply
Dan - January 20, 2012

Shane,

Can you comment on using Cloud Flare and Total Cache in an MU environment? Do you have any specific tips for those of use who serve a network of sites?
Thanks for the well written post.

Reply
Jane Wilson - January 25, 2012

Thanks for the article, it helped me to reduce loading time from 3.5 to 0.7 seconds. Also using webpagetest I found the better one out of two very similar wordpress themes!

Reply
David Muñoz - February 28, 2012

Thanks a lot for this post! I have had problems to load my web on wordpress and I hope that with your tutorial I will can change this. I try all of you have said. Thanks so much again. Very good post and blog.

Congrats!!

David.

Reply
    Shane - February 28, 2012

    Thanks, David!
    I’d love to hear what results you got, once you’ve applied some of the tweaks listed here. :)

    Reply
Tim - March 14, 2012

Thank you Shane. With this great guide I optimized my web site for about 50-60% of speed.

Tim

Reply
Garth - March 25, 2012

I’ve been working on speed on my main site for a while and already did a few of the things suggested here, with pretty good results. I tweaked a couple W3 Total Cache settings and set up Cloudflare per this post, and the difference is amazing.

Bumped my GTMetrix grades up significantly, cut my metrics almost in half, and just clicking around the site, everything is loading almost immediately!

Now to try this on another site that has been a dog in terms of speed and see if how much it helps on that one…

Thanks for this detailed post on page speed, once again you deliver more useful information in an understandable way than I have been able to find anywhere else.

Reply
    Shane - March 25, 2012

    Hey Garth,

    Thanks for the comment! Awesome that you got such good results on your site!

    Reply
      Garth - March 26, 2012

      Just implemented most of this on my notoriously slow site (SmushIt not working for me yet and can’t get in to the domain settings in Cloudflare to enable minification and Rocket Loader” yet).

      Home page pre-test page load time: 6.46s
      Home page post-test page load time: 0.93s

      Holy cr*p!

      Reply
Bogdan - March 29, 2012

Very nice man! I saw this post last year and i follow you steps and i have good results.
I bookmark this page because i use this steps on my new sites everytime.

Thx again

Reply
Kevin - April 6, 2012

Hi Shane,

Thanks for sharing this valuable info on how to speed up your blog. Got the page url off a post in the $100K forum where I’m a member. Unfortunately I can’t afford your SECockpit subscription just yet but it’s on my list of must-haves (I’ve seen the video).

Anyway I followed your recommendations here as my pages were loading extremely slowly – 16+ seconds on average. To be honest I couldn’t understand all of the recommendation tips in GTmetrix, but what an awesome analysis tool.

Got my page down to 2.70 seconds now – so off to implement changes on the rest of the pages which shouldn’t take as long as many of the 1st page changes were global.

Thanks again for sharing.

Chow chow,
Kevin

Reply
    Shane - April 6, 2012

    Thanks for your comment and for sharing your result, Kevin!

    Dude, from 16 seconds to 2.7 seconds? That’s a stellar result! :)

    Reply
cathy - April 25, 2012

Shane,
This is a fantastic post. I am having some challenges however because I have a subdomain that requires ssl. My wordpress installation went absolutely haywire after trying to implement Cloudfare pro version (had to do that for the ssl) do you know if there are issues with ecommerce plugins not really working well with cloudflare and/or W3 cache (am using woocommerce plugin)

would really appreciate your comments and suggestions.

Reply
    Shane - September 26, 2012

    Sorry to hear about those issues, Cathy. I’ve never tried CloudFlare on an SSL site, so I didn’t know about that.

    In general, I don’t see why caching would be an issue with SSL, but I can’t say for sure because I’ve not tested it myself.

    Reply
joe - May 1, 2012

Thanks !

Add Plugin Organizer plugin, it takes some work, but it is a very powerful tool, since plugins are loaded even if they are not being used.

Reply
Ben Francia - May 18, 2012

Very useful information, Shane. I’ve been looking for a guide like this for my blog and other wordpress sites I build. I will start implementing your recommendations

Reply
Free Newbie - May 25, 2012

Thanks for this tips, really useful tips, cheers!

Reply
Lauren, Ephemerratic - May 26, 2012

Wow, thanks for a great write up written in non-techie, approachable English! I implemented many of your tips and brought my page load speed down from a horrifying ~20s to 3 to 4.

Now if I could only get my WordPress admin dashboard to similarly speed up!

Reply
Your Answers - July 20, 2012

Just wanted to say THANK YOU. This was exactly what I was looking for. WooRank was clocking my site at 2.47 seconds for initial load. I am hoping the cloudflare will get my site where it needs to be. Can’t wait till next week to run another woorank report.

Reply
Pierre | Internet Business Generation - July 20, 2012

Great post Shane! Some very good plugins mentioned. I am still sceptical myself about Cloudflare – what sold it for you?

Reply
    Shane - September 26, 2012

    Before and after results from testing it.

    It doesn’t always work well. Depends on the hosting and the theme etc. But I think it’s well worth testing. :)

    Reply
Paul - July 24, 2012

Shane will have to confirm this, but I remember him doing a comparison of site loading times with Cloudflare enabled and disabled and he found that Cloudflare offered a significant reduction in site loading time.

We had a few caching issues that we originally attributed to Cloudflare, but actually they turned out to be caused by WP Super Cache. So, no problems to report thus far as far as I’m aware.

Reply
    Shane - September 26, 2012

    Yes, that’s correct. Especially on the shared host, CF made a big difference!

    And yeah, WP Super Cache was a pain…

    Reply
Steve - August 14, 2012

hi Shane
this article is ridiculously good but leaves me with a question.

One tip to increase speed is to minimize use of plugins, but then you go on to recommend a whole heap of plugins! Is it ok to use all or most of the plugins you recommend here? Is there any detrimental effect of using them all together and do you know if any of them conflict with each other and should not be used together?

CHEERS!

Reply
    Paul - August 14, 2012

    Hi Steve,

    Most of the plugins that Shane has recommended are not going to have a huge difference on page load times in the front end of the site mainly because these are backend operations that don’t need to be executed each time a visitor loads a page on the site.

    It is not out of the question for WordPress plugins to conflict but I see no reason why you can’t use the aforementioned plugins together.

    Reply
Antwan - August 15, 2012

This design is incredible! You obviously know how to keep a reader entertained.
Between your wit and your videos, I was almost moved to start my own blog (well, almost.

..HaHa!) Wonderful job. I really enjoyed what you had to say, and
more than that, how you presented it. Too cool!

Reply
Grout - September 5, 2012

I recently came across your blog and have been reading along.I’m satisfied that you shared this helpful information with us. Really looking forward to read more.

Reply
Ruth - September 26, 2012

I just tested your site speed, imimpact.com (optimized for speed)? and it is way slower than any of my sites (not really optimized for speed) ….

Reply
    Shane - September 26, 2012

    Hi Ruth,

    Bad timing, that. I’ve just migrated to a larger hosting package and have removed caching and CloudFlare, because they were causing trouble in the transition.
    I will now have to reinstall and re-test those measures, which may take a few days.

    But at any rate, it doesn’t matter how fast my site loads, IMO. What matters is how much faster yours will load, after following this guide. :)

    Reply
Ruth - September 26, 2012

Thanks for the response, and yes, the most important would be how fast mine loads, but, because you stated that these measures were done on your site I wanted to see the difference between yours and mine, and see if the difference is big enough to warrant the extra work :) … Anyway, great article, thanks

Reply
Leonardo - October 22, 2012

Thank you for this. I am going to try to use CloudFlare. Hope it work beter.

Reply
Steve Potgieter - October 24, 2012

Thank you for this post. I was wodering wht to do with my WordPress bog. I went from a staggering 11 seconds to well under 3 seconds. sometimes 1.6 seconds even. You made my day and I’ll be sharing this post with others.

Reply
Steve Potgieter - October 25, 2012

While I’m at it. lol is it better to upload images to photobucket and then post them on your blog using html or direct link than uploading them t your blog and using smuch it on them?

Reply
    Steve Potgieter - October 25, 2012

    For page speed that is…

    Reply
    Shane - October 25, 2012

    Loading from your own server is better. If you remotely load them, that adds external calls. Unless the place you load them from is a dedicated media-CDN, that’s going to slow the loading time down.

    Reply
Leon - November 19, 2012

Thank you for this great and simple guide…It’s very help me for my web site.

Reply
Ken - November 27, 2012

Hi Shane,

Thanks for your article, I’ve improved the speed of my wordpress so much :)
BTW, I really like your left sticky social bookmark bar, is it a free plugin? Can u tell me the name of this plugin? Thank you so much.

Reply
    Shane - November 27, 2012

    That’s awesome, Ken! Thanks for reporting back with the result.

    The social bookmark bar is custom built, but we might add it to our free plugin in the future.

    Reply
Yvon - December 8, 2012

I was looking to see if this topic had any better results since I last visited the search results. Good job on all of your success my man.

I just have 2 questions which are unrelated:

1.) which is the pop uo optin are you using?

2.) what is the font your site is in?

Thanks and all the best. Peace

Reply
Mohammed Karam - January 6, 2013

Big Thanks Shane , I was install some of this plugin but i can`t use it . Thanks again .

Reply
Oscar - January 11, 2013

Dear Shane,

Thank you for great article. My site is now very fast.

Thanks again.

Reply
Costin - February 14, 2013

Hi,

Please take a look at this blog post as there are no images loading at the moment.

Reply
    Shane - February 14, 2013

    Sorry, we had some server issues. The post is back up, although there are still some minor image issues that we’re currently fixing.

    Reply
Steve - March 13, 2013

I have a dedicated server hosting my sites. I used your optimization recommendations in this post in the past, but it looks like the CloudFlare setup has changed. Before the article was updated, I believe DNS changes weren’t required to use CF’s minify. Now it looks like I need to make these changes to make it work. Is this accurate? Please briefly go over the minimum required setup to use CF’s minify option.

Also, I recently updated WP and all my plugins, but I cannot recall if W3 required an update. Somehow the updates caused me to lose all my W3 Cache settings. Have you had this experience and are you aware of how I can backup the W3 cache settings to ensure this does not happen in the future?

Reply
Emory Rowland - March 23, 2013

I enjoyed reading this, Shane. I hadn’t heard of the gravatar tricks, that should solve a big problem for me. Much appreciated.

Reply
    Shane - March 23, 2013

    Thanks for your comment! Making this change in Gravatar can have quite a dramatic effect on posts with many comments. I’m glad I made the change. :)

    Reply
Forrest Smyth - April 8, 2013

Hi Shane. Great article as always!

I’m in the process of setting up a membership site in WP using DAP, and my site is running incredibly slow. Unfortunately using any kind of caching plugin isn’t an option.

I haven’t implemented any of your other suggestions yet but will do over the next day or so. In the meantime, I’m interested in the performance difference between the free CloudFlare plan and the $20/month Pro plan. I presume in your article you are referring only to the free service. Have you tried the paid service at all, and do you know if it offers significant speed improvements over the free service?

Keep up the good work!

Reply
    Shane - April 8, 2013

    For this post, I tested the free version. I also upgraded to the Pro plan for one of my sites, but I’ve found no perceptible speed difference before and after the upgrade.

    Reply
    Forrest Smyth - April 9, 2013

    Looks like my site uses SSL, so I can’t use the free version of CloudFlare anyway, unfortunately.

    Reply
Thijs Elenbaas - April 11, 2013

Hi, nice Post! Because my WordPress blog was loading quite slowly, but mostly because it was fun, I measured, benchmarked and optimized my little website with a range of free tools I came across on the web (webpagetest.org, pingdom, CloudFlare, etc). I think I came to the same points as you mention in your post. Interestingly enough, of all the fancy things I did, old-school optimization of image size had the biggest impact :-)

Please let me know if you find this useful:
http://thijs.elenbaas.net/2013/04/analyzing-and-optimizing-performance-wordpress-website/

Reply
Siegfried - April 14, 2013

excellent tutorial!
I also use JPEGmini to optimize jpg files. good way to find out which files are loading too long is pingdom analysis tool.
I do not recommend cloudflare – I think it actually introduces few problems with spiders
best regards!

Reply
Mathieu - April 15, 2013

Thank you so much! I looked for a post of this kind to improve my blog, and couldn’t find it until now :)

Thank you to take time to share your knowledges with others, and make it easy to read and to understand.

Reply
KHOKON - April 15, 2013

Thanks a lot for this awesome post. Now I can reduce my blog’s page loading time! Am I not right?

Reply
Abhirath - April 22, 2013

Hello,
I used the w3 super cache plugin and my website speed actually reduced. Google page speed showed a score of 82 before the w3 plugin. After installing the plugin it shows a score of64. It would be great,if you could make a post on configuring w3.

Reply
Lorenzo C. - May 3, 2013

Well written post! I also recommend running a lean WordPress site.

Take a look at the P3 Performance profiler plugin.

It makes it easy to audit your existing plugins to find the slowest ones. From there you can deactivate them or replace with alternatives from the WP plugins directory.

Reply
beton - May 7, 2013

really useful tips

Reply
Theresa - July 10, 2013

OMG, you have saved my sanity! I installed W3 Total Cache on a website yesterday, and it made the site slower. Your tips here and the tips on GTmetrix finally helped me make it work. Thank you!

I, too, have had quite a variance in site speed on GTmetrix. My two tests tonight showed one with a page load of 2.77 seconds, and one of 28.33 seconds! And the file holding up the site is the W3 Total Cache javascript. I need to figure out how to do 2 things: 1) defer parsing of javascript; and 2) optimize order of styles & scripts. I’m a designer, not a programmer. Any recommendations on instructions for these steps would be welcomed.

Reply
adel - July 14, 2013

Thanks a lot for this awesome post. Now I can reduce my blog’s page loading time!

Reply
Tomas Michaud - September 9, 2013

I had problems with members not being able to log in to one of my membership sites. One of the owners told me I can’t use DAP and W3TC. Actually they said I can’t use caching at all on a membership site as it conflicts with the function of allowing access or not.

I did disable W3TC and have not had problems since.

I don’t know if this applies to Cloudflare but I’m a bit nervous to try it on a live membership site.

Reply
Chanrida - September 26, 2013

I’m not sure about cloud flare. Now i use hostgator. Is cloudflare free feature can replace my current hosting? Thanks Shane.

Reply
    Shane - September 26, 2013

    No, Cloudflare doesn’t replace your hosting. You can think of it as an additional layer on your hosting, which will help speed up the delivery of certain assets on your site and also keep spam bots away.

    Reply
Howard Platt - October 13, 2013

Hi Shane,

This is an incredibly awesome post, I still haven’t made it all the way through but I have an issue I was hoping you could help me with.

I have a lot of comments on my site so I made the change to the “blank avatar” but when I check my source code it still seems to be making the call to the Gravatar site even for those with no Gravatar.

Example of link shown in source code:
http://0.gravatar.com/avatar/a88e554f7a734e8d779c297a06c09d10?s=66&d=blank&r=PG

I haven’t gone as far as to modify my theme but if I cannot find another solution I think I may have to try that route. I am using the Thesis Theme, I’m not sure if that has anything to do with the issue or not but thought I should mention it.

I will also be switching out my optin plugin and install your Hybrid Connect which looks awesome.

I really appreciate all the work you have put into writing this post.

Thank you!
Sincerely,
Howard

Reply
    Shane - October 23, 2013

    Thanks for the comment, Howard!

    You make a good point about blank Gravatars. I wasn’t aware of that before. There are only two ways around this, as far as I know:

    1) Deactivate Gravatars all together.
    2) Use the code addition to functions.php as shown in this post to load the blank/default Gravatar locally.

    Reply
Reginald - December 15, 2013

Hey Shane,

Nice guide you got there mate!

I have yet to try lazy load (yes call me lazy) but will try that soon.

Thanks for sharing!

Reply
Sorin - February 22, 2014

Hey Shane,

One of the best tutorial I’ve read for a long time. Good information and I saw the results immediately, after I followed your steps.

Thanks,
Sorin.

Reply
Iteire Apollos - March 22, 2014

shane i have nothing to say but to tell you this “you are a genius” before i followed you tips i checked my page speed on gtmetrix the score was 41% after immplimenting some of your tips because not all worked out fine, my score jumped up to 86% which is times two optimization and it’s evident in the loading time. You did a great job and i will advice everyone to read this post if they want to their page to load fast. If they find it hard to believe i think it’s time for them to experiment this post with a wordpress test site to see how effective these tips are. You can check my score for yourself on gtmetrix http://www.nigeriajoblinks.com although i tried google tool which rated me 75% but i think that’s great to start with and getting my score on google to rate my page 90%
Thanks for the tips, and i can’t overemphasize that your tips are so effective. I can’t really express what i saw on this post.
Thanks once again.

Reply
    Shane - March 27, 2014

    Thank you very much Iteire! Awesome to see that you got such a good result from this guide. :)

    Reply
Jason Mathes - April 18, 2014

Shane – another thing you could start using instead of having to resort to sprites? Awesome Font! It is amazing what can be done to help format your posts, use them for your Social buttons.. and you don’t have to suffer additional load times by using them!

Reply
daniele - May 6, 2014

Thank you so much! Really helpful.

Reply
Sharanyan Sharma - May 16, 2014

Excellent WP optimization Tips Shane!
Using Cloudflare and CDN will create conflict ?

Reply
    Shane - May 18, 2014

    CloudFlare acts as a CDN in many ways, so I can imagine that if you try to use another CDN on top of it, things won’t go well.

    Reply
Greg - August 25, 2014

Great article Shane! I am currently using Cloud Flare for a design customer of mine. So far so good…looks promising.

Reply
Codeilo - September 12, 2014

Hi shane thanks for your article and it really works but i had still one problem that how to remove the timestamp which is automatically added to the uploaded image in my site and due to this timestamp server has to load more times the same image and speeds fall down.If you have any good idea then i am waiting for that.

Reply
Smith - September 29, 2014

I have used W3Total Cache, But with recent updates and new premium services it does not work any more.

Though I decided to do all the work manually instead of focusing and configuring the plugins.

They usually crash and one have to keep on updating them. So to avoid such scenario I am able to optimize sites and improve page score to 90+ which is a great success.

And for static site I am able to reach 95-97 score with load time less than a min.

So I prefer to work manually.

Reply
adeem - November 20, 2014

I have read a lot about W3 cache and its related things, however I always face some problems while loading my site. Sometimes, it takes too much time to get loaded. What could be the reason behind that?

Reply
    Shane - November 22, 2014

    There’s no one right answer to this. What you can do is run site speed analyses using GTmetrics WebPageTest and similar tools and look through the waterfall graph to see where the slowest points are.

    Reply
JD - December 9, 2014

Thank you for the useful article. It makes a big difference to me. However the link to the sprite guide is broken. Can you please provide another link or useful information on how to sprite images

Reply
Keith - December 16, 2014

In lieu of using Smush.it, try the free “EWWW Image Optimizer” instead, in the wordpress plugin directory.
https://wordpress.org/plugins/ewww-image-optimizer/

Hey Shane,

Excellent Post and advice, as always. And OMG, what a response this post has stirred up!
Usually I just absorb your advise, but this time I have some value to add…

I used to use Smuch.it, but I LOATHED that it made so many calls to Yahoo. (which is counter to ultimate speed)

EWWW took the Smush.it code, improved it throughout and made it SELF-CONTAINED. No external calls.
It optimizes as you upload, you can go back and bulk optimize, you can even optimize images OUTSIDE the media (ie: theme image folders!). Further, it has an extensive and exhaustive admin panel to tweak to your hearts content..

I really believe you’ll switch from Smush.it after giving it a try. It is a default plugin on all my WP sites.

GTmetrix, cloudflare, w3 TotalCache are defaults in my WP arsenal as well :)

I hope that helps someone!

Regards,
Keith

Reply

Leave a Reply:

Notify me of followup comments via e-mail. You can also subscribe without commenting.