Click here to go to Win A Day Casino Mobile!
How To Optimize Your WordPress Blog

How To Optimize Your WordPress Blog

I promised you in the last post that I would tell you how to optimize your blog so that you can increase it’s speed and at the same time keep Google happy. Before optimising this blog and moving it to {inmotion hosting}, it used to take over 12 seconda for the page to fully load. Now it takes around 3 seconds. You have to admit that is a pretty big difference. This post will be the first of a series of posts that wil explain how it did it. The first step was to resolve the issues suppled by Google’s Page Speed Insight. The initial scan of this blog showed that as far as Google was concerned I had some high priority issues to resolve.

[redbox]High priority.These suggestions represent the largest potential performance wins for the least development effort. You should address these items first: Serve scaled images, Leverage browser caching, Enable compression, Optimize images[/redbox]

For the purpose of this post I will show you how to resolve these issues starting off with serving scaled images.

How To Serve Scaled Images

serve scaled imagesA scaled image is when you’re displaying a scaled down image of a full size image that is hosted on your blog. This usually
happens when you reduce the size of an image so that it fits within the confines of your post, which was my issue. There are  also many sites who scale down their images so they fit in their sidebars or just to display a smaller version of the original one. The problem is that although people think that they’re conserving bandwidth and increasing speed by doing this they’re not because the server actually downloads the full image before displaying the scaled down one.

The solution is to only display images in the actual size you want. This will mean resizing the image offline and then uploading it back to your blog. Now when people access your site they’re only downloading the smaller image thereby increasing blog speed. Once I did this that warning disappeared.

How To Leverage Browser Caching

leverage browser cachingWhat Google wants us to do is to set an expiry date because ‘Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.

Too bad Google doesn’t show us how to do this. I looked for ages on the net and tried many plugins. None of the plugins I tested work I wasn’t having much luck on the net either until I came upon this post, How To Leverage Browser Caching In Apache.

What I did was to add the following code, just as the post suggested, into my .htaccess file and that resolved the second issue.


# Begin Leverage Browser Caching
Header unset Pragma
FileETag None
Header unset ETag
<FilesMatch “\.(ico|jpg|jpeg|png|gif|js|css|swf|pdf|flv|mp3)$”>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 14 days”
Header set Cache-Control “public”
<FilesMatch “\.(html|htm|xml|txt|xsl)$”>
Header set Cache-Control “max-age=7200, must-revalidate”
# End Leverage Browser Caching[/yellowbox]

Just keep in mind that the VPS Server I’m hosted on uses Apache and I made sure of that before making these changes.

GZIP Compression On WordPress

gzip browser filesMost people know that it’s a lot easier to upload or download a zipped file than an uncompressed one. This is because the zipped file is so much smaller. The same applies to websites which is why Google is looking to see if websites have it enabled. Naturally the first thing I tried was the WordPress plugins but although I didn’t get any error messages as far as Google was concerned my blog wasn’t compressed. Damn! :hairout_tb:

Oh well, I may as well resort to Googling to find an answer, and after a long search and many trials I came across How To Enable GZIP Compression On Apache. Once again, take note, your server has to be running Apache for this to work! This is the code I added to the .htaccess file.


# Enable GZIP
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
# End GZIP[/bluebox]

I went back and tested it with Google and much to my delight I had resolved another issue.  :clap_tb: If you want to check to see whether or not your site is compressed I found a site that will do a Http Compression Test.

Optimize Images For Your Blog

optimize browser imagesThe Google Page Speed Insight checks your site for optimised images because it knows they make your site load faster. This is because an optimised image is much smaller than the original. Luckily there is a WordPress plugin that will do that for all images in the media file, WP Unfortunately not all my images are in that file, but luckily I found a website,, which allows you to optimize your images online. Better still, they had available a free tool for download that will let you optimize single files or even whole directories. That was a much better option. I simply downloaded my image directories, optimised them and then uploaded them again.

To improve site speed even further I downloaded the images from advertisers, optimised them and then uploaded them to my server. This is a much better option because there are times when the host site is down which then slows yours down as it tries to retrieve the image.

That;s it for this session. Don’t forget to join my list so you don’t miss out on future posts on how to optimize your blog. If you found this post helpful you may want to promote it via your favourite social network.

I would love to know if these tips worked for you and if you have any other ideas we can use to make our sites go faster. You know the drill, just leave a comment.

Digiprove sealCopyright secured by Digiprove © 2012-2015
Previous Post

WassupBlog Now Hosted On A VPS Host

You certainly don't have to be Tom Cruise to have a need for speed! Nope, ... Read more

Next Post

Friday Funnies #41 Horny Wife

It's been a week since moving this blog to [inmotion hosting] and I have to ... Read more

Please follow and like:
Follow Me

Peter Pelliccia

I'm an Aussie blogger who loves to blog and share everything that I've learned on my blogging journey, including blogging tips and ways to blog for money. I am also trying to make my way on YouTube. You can follow my progress by subscribing to My Bonzer Channel.

This Post Has 43 Comments

  1. Twitter:
    This is going to sound strange coming from me about you but wasn’t all that a lot of work? Man, that sounds like a lot of work! I had to stop using because it messed up my blog; not sure you remember the post I wrote about that. The other stuff… I’m not sure if I’m on Apache or not; no idea how to find out either. Still, overall my site runs fairly quickly, although WordPress does have this thing where it automatically creates images in multiple sizes and they end up in that image folder, and that’s something I wish I could control better.
    Mitch Mitchell recently posted…The Trouble With Getting Your Friends, Family & Local People To View Your BlogsMy Profile

    1. Hey Mitch, it was a lot of work, and that was only half of it :smoke_tb:

      Your CPanel will tell you if you’re running Apache. As for, if you don’t use it you can always optimise the pictures before uploading them to your blog.

      You also have a couple of images, especially the one with the parrot, that could be scaled. :wink_ee:

      Anyway, I did all the hard work for you, the research and the trial and testing of what I found. The easy part is to make use of my findings.
      Sire recently posted…Review Of The Covert Social Buzz PluginMy Profile

      1. Twitter:
        I don’t have cPanel with 1&1 so maybe I need to go another route. And don’t be picking on my parrot! lol
        Mitch Mitchell recently posted…Ode To Joy Day!My Profile

  2. Twitter:
    W3 cache plugin works best for my blog. 2nd time a visitor visits my blog, the page loads in couple of seconds. Caching is the best way to speed up.

    1. Caching is very important but it’s not the only way to speed up your blog. Also you never know if Google will downgrade a site if it does not score well in the optimisation field.
      Sire recently posted…WordPress Plugin That Improves Your Bounce RateMy Profile

  3. Twitter:
    Thank you Sire. It is in fact a gem post. Leverage browser cache and Gzip compression was the most searched solution. Thanks. I’m implementing them in my htaccess files right now.

      1. Twitter:
        I tried to add the Leverage Browser Cache and gZip codes but it might be I used it in wrong location or I need to modify the code, I’m just getting Error 500.

        I’m using bulletProof Security plugin and it allows me to add custom code in .htaccess file. But I guess there is something wrong. I could not make it work for me. :(

        1. Did you add the code one at a time or both together? I suggest doing it one at a time to see which one is causing the problem.

          I’ve never heard of the bulletProof plugin. I download the .htaccess file to edit it and then upload it. As for positioning I don’t think it makes a difference. I just added it at the end.

          Also, did you make sure your server is using Apache.
          Sire recently posted…Why I Love WP Zon BuilderMy Profile

  4. Twitter:
    What would we do without you Sire, my load speed average at the moment but anything i can do to increase it more i will do, so thanks for all your hard work much appreciated

    1. My pleasure antjon. No reason why everyone should have to sweat it out when I’ve already done the leg work. :thumbup_tb:
      Sire recently posted…Lotto AffiliateMy Profile

  5. Twitter:
    So many tools to optimize our blog. It really gets better each day. WordPress rock!

  6. Optimizing images is a great idea, and this sounds like an incredibly useful tool to have for your site. Slow loading and broken images can really hurt your initial impressions with new visitors. It sounds crazy but even something as small as a slowly loaded image can be enough to drive people away from your site. Having an optimization tool like this can be really useful and add to the overall presentation of your pages. Very useful stuff!

  7. Hi Sire,

    As Mitch said, it looks like a helluva lot of work but well done you for finding a solution to the problem of loading times – the increase of around 400% is huge and not something to be sniffed at, at all. As ever I can’t use it though because I have a Blogger blog but no matter, it’s still impressive to know about these things.

    Best wishes,


    1. It was a lot of work Roz but standing back and seeing all the issues resolved, not to mention the burst in speed, made it all worth while.

      Even though you have a blogger blog you could still make sure you only serve optimised images :thumbup_tb:
      Sire recently posted…Friday Funnies #39 Best For LaughsMy Profile

  8. Twitter:
    Hi Sire, I just had a few things done to my blog from reviewing a service but it did,t help all that much. I couldn’t give them a good review so I won’t be promoting them but they were trying to speed my blog up. It’s already pretty fast but I’ll want to add more to it, sooner or later.

    I’ll have to look into GZIP, that’s the first I’ve heard about compressing a website while online.

    1. Hey Brian, I just entered your site into Google’s PageSpeed Insight and the only thing listed under high priority is to leverage browser caching. I’d do it just to keep Google happy, if you’re that way inclined, because your blog does load really quickly.
      Sire recently posted…How To Optimize Your WordPress BlogMy Profile

      1. Twitter:
        Thanks Sire, I can also remove old plugins and clean up my old CSS. These are things I know to do but keep putting them off.

  9. Being new to WordPress, this article as well as the comments below somehow give me an idea on what to do on the optimization. I would be implementing these guidelines when I will be putting up my wordpress blog soon. I think it’s a bit complicated but there are tools to help simplify the optimization.
    Gerrid Smith recently posted…What is Google+ Local?My Profile

  10. Great post for WordPress blog optimization! Enabling Gzip compression will help speed-up your WordPress website drastically and reduces bandwidth usage as well. This is possible only if visitor’s browser can support it.

  11. Twitter:
    Thanks for this good stuff… for those who are interested in further research I’d recommend using CloudFlare as a CDN to speed up your website load speed.

    1. I actually did join CloudFlare after writing this post but didn’t notice all that much difference.
      Sire recently posted…Friday Funnies #41 Horny Wife My Profile

  12. I’m definitely getting my blog optimized using these tips Sire. One thing I’ve always wondered about is how some sites optimize their images such that they can publish large dimension images and yet their sizes are just in Kilobytes. If I publish my images in those dimensions, they always end up with sizes running up into megabytes. Perhaps this plugin is the answer. Thanks. :)

  13. Wonderful post.Thanks for detailing all the important aspects for optimizing wordpress blog.I was not aware that there are so many tools out there to optimize your blog.I have been using wordpress from long time back but I was not aware of many things that you have detailed in your article.

  14. WordPress has endless things to optimize. You have provided some useful tips, I would be implementing these guidelines when I will be putting up my wordpress blog soon. I think it’s a bit complicated but there are tools to help simplify the optimization. Good post, thanks for sharing.

  15. I have never tried the image scaling technique that has been discussed in this post and after reading it i definitely feel the importance of trying out this.I was really not aware of this thing that you have detailed and i was never aware about it.Thanks for the detailed post.

  16. Twitter:
    Great article with good suggestions.
    I also started to pay attention to the speed of loading my website.
    In the first place because now a lot of people are connected to the internet via smartphones and tablets, and then with a mobile connection, which is more affected by the slowness of a website

  17. Twitter:
    WordPress, or any other blog really, is an emerging tool that more than enough people take advantage of in the modern scheme of online marketing, social networking and content curation. The fact is, there are so many ways to use a blog, that you really better find your niche when doing so; if not, you’ll wind up buried amongst the masses and unsatisfied no matter the quality of your content. For that reason, and trust me – I’m still learning, there are considerations to make.
    Patrick Ryan recently posted…3 Simple Questions to Ask Yourself Before Starting Anything in Social MediaMy Profile

      1. Twitter:
        Just relaying my stream of consciousness after reading this awesome post. Sorry for being a bit random :)

  18. Thanks for sharing, My host company took my site down last week as it was using too much bandwidth on a a shared server. It has only 100 plus pages but there was so much traffic and it was the plugins and widgets that were causing the problems.I WISH I had this as a check list then!

  19. Now I’m using a VPS server from a local host company

Comments are closed.