How Pros Make Money Online

Income Diary

15 Ways To Speed Up WordPress

By:     Topics: Blogging     More posts about: ,

Faster, Better, Stronger; How To Speed Up Your WordPress

Keeping your site fresh with content is enough to keep even the most organised person busy for a few hours, but what is the point of writing fresh, exciting and keyword rich content if all of the visitors that arrive at your website are struggling to view your articles?

A lot of people seem to think that their blogs and websites will be okay if left unattended however we know that this is not the case and as you continue to put more an more content and images into your site, the site itself becomes slow.This can all be avoided if you can keep on top of your site with some pretty handy plug-ins as well as a few choice tips and tricks.

No one likes to see their site become slow and clumsy, it puts people off due to the overall experience the user/reader has and this can affect your traffic if not taken into serious consideration early enough. That’s what this article is all about – helping you to keep your WordPress website up and running cleanly, and as fast as possible with the minimum effort.

However I won’t lie; there are a few things that will be a little time consuming but isn’t it better to take the time to fix any bugs and glitches you may have so that your readership can have a smooth ride all the way through your website? I hope these 15 tips help you to speed up website and keep your readers happy, they have certainly helped me.

Use Firebug and Yslow

Before we start optimizing your site you need to find a way to measure your improvements. The best way to do this is to use Firebug in combination with YSlow which gives you detailed information about how long it takes to download your website and how much bandwidth it uses up.

Then before you start optimizing your site write down all this information. That way it will be easy for you to track whether what you have done has really improved your site speed. And at the end it will be a great thing to look back and realize how much bandwidth you have saved. For me I went from 360KB to 220KB without even complete optimization.

W3 Total Cache

Installing a cache for your blog is essential, especially for websites that get a lot of traffic. Whenever someone visits your blog the back-end has to put together the whole site and then present it back to the user. What a cache does is to simply save the created page and to show it to the next user. That way you save load time because the server doesn’t have to compile the whole website every time a user visits the blog.

That’s exactly what W3 Total Cache does. But it also does a lot more. Simply install it and it will by default also compress your pages, CSS, Javascript, minify HTML code and a lot more. So just install the plugin.

The default settings are pretty good but need to be extremely optimized. This is beyond the scope of this report, but if you want to learn about configuring W3 Total Cache right then read this excellent tutorial. It covers everything you need to know.

Smush the Pictures

One of the things that takes most of the the loading time are images. Whenever you use images you should be careful. If you use high quality images on your blog then you should make sure that they have smallest file size possible, without losing quality.

One of the best things you can do in order to save bandwidth and thus decrease your loading time is to remove unnecessary information from pictures. Usually when a picture is taken, all of the information is stored in it such as the camera it was taken with, the lense that was used etc. In order to save space you need to remove this information and that’s exactly what does. It’s a WordPress plugin that automatically decreases the size of images, without losing any quality, whenever you upload an image to your blog. This can dramatically increase your blog speed.

Tip: Once you have installed it go back to your blog dashboard and go to Media ? Library. There will be all the pictures which you have already uploaded. Optimize them individually by clicking on the now! link.

Scale Pictures

Most of the bloggers download pictures from sites like, Flickr etc. these days. Normally the images you download from there are way too big to simply upload them to a blog.

So before you upload an image to a blog be sure to run it through Photoshop or Gimp (a free Photoshop alternative). Within the program select the option Image Size or Scale Image. Then scale the image down to at most the width of your blog’s content section, usually this is around 500-580 pixels. Afterwards simply save it and upload it to your blog.

Save Pictures in the Right Format

Some people make the mistake of using the wrong image formats when saving pictures. The three most popular image extensions are .png, .jpg and .gif. Each of these formats have different advantages.

Whenever you have an image like a picture (taken with a camera and without a lot of writing) you should use the .jpg extension. If you have a simple image on the other hand with only a color background and some writing, without any fancy effects, then save it as .png or .gif.

The best way to learn what type of format when to use, is to simply go ahead and save pictures in all three formats. Then take a look at the file size and the image quality. That way you will get a feel for  when to use which image format.

Upgrade WordPress

Upgrading to the latest WordPress version is necessary because upgrades usually include several performance upgrades and they further fix bugs which could slow down your server.

Therefore download the latest version of WordPress.

Pick the Right Web-host

One of the easiest ways to have a faster blog is to choose the right web host. There are lots of web hosts that lure people in by promising low prices. But don’t decide a web host based on the price.

Before you decide on a web host be sure to spend some time researching and figuring out the right host. Ask friends and look for reviews on the Internet (but be careful there are a lot of biased reviews out there). The right web host can dramatically increase the speed of your blog.

I can only recommend Hostgator, it’s the best web host I’ve ever used.

Don’t Rely Heavily on Other Websites

Whenever you include an object from another website, a script, image or something alike, the browser has to perform an additional DNS query for that website in order to find out it’s IP address. This usually takes a while. In order to stop this from happening simply host the code or the image yourself.

Tip: Whenever you are deciding on promoting a product as an affiliate, don’t just copy and paste the code that is given to you on the affiliate page. Around 80% of these banners have a bigger file size then they should have. Be sure to download and optimize them using before uploading them to your blog. Sometimes also changing the image format helps to reduce the size of the banners.

CSS Includes to the Top

All CSS files that are used on a web site should be included in the header section or the header.php file.

Putting CSS files in the header means that the content can be rendered progressively. This means with every CSS file that is downloaded the page, that the visitor sees, will become more complete, and thus will indicate progress to the user.

Javascript Includes to the Bottom

Javascript is used on most web sites these days. Usually though Javascript is not used to render content or anything of real importance. Therefore it makes sense to move the Javascript code into the footer (or the footer.php file). The biggest reason for doing so is that usually a web browser can download two files in parallel, with Javascript this is different:

While a script is downloading the browser won’t start any other downloads, even on different hostnames. The browser therefore has to wait for the whole script to be downloaded before it can download any other data.

Internal CSS and Javascript

Every sort of internal stylesheet or Javascript code should be avoided if you aim at increasing your web server’s speed. The reason for that being that servers can’t cache internal code. Therefore every time a person visits your web site the internal data is downloaded again.

So try to use external stylesheets.

Flush Early

A web server has to generate a web site every time a person visits it.  Usually the web server creates the whole code and then sends it to the visitor. By using the flush function from PHP, the server sends a message to the browser right after having created the header. That way the browser can already load the files linked to in the header while waiting for the other part of the page.

To use this flush function on your web site add this code to the header.php file, right after the </head> tag:

<?php flush(); ?>

Database Calls

Reducing the number of database calls is another requirement to speed up WordPress. This is easily done by swapping dynamic properties to static ones:

Instead of

<link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />

you could use

<link rel=”pingback” href=”” />

which is static and thus does not require a database query. If want to read more about this then this post about speeding up WordPress.

Use Shorthand CSS

Shorthand CSS is a technique to reduce the size of your stylesheet files which is supported by every browser. Instead of writing:

.link { padding-top:3px; padding-right:10px;

padding-bottom:5px; padding-left:2px; }

you could write:

.link { padding: 3px 10px 5px 2px; }

which is a much shorter version of the code above. WPCandy has created an article which describes the steps taken to reduce CSS files more perfectly than I do.

Reducing the Number of Plug-ins

Obviously this is an essential step to decrease the load time. Every WordPress blogger uses lots of plug-ins but are they all really needed?

Just ask yourself whether a plug-in adds value to your blog. If it does than keep it running, otherwise get rid of it.

Split Comments into Different Pages

If you are getting lot’s of comments on your blog then it might make sense to split the comments onto different pages since otherwise the server load for loading one page will be too high. You can do this via your WordPress dashboard.

Go to Settings -> Discussion. There should be an option Break Comments into Pages of … and just activate it.

Optimize your Database Every Week

Optimizing your database is important because essential it helps to reduce the load time. You can either do this manually or just use a plugin, either way should work fine.

If you want to do this manually then go and log into phpMyAdmin. Find your WordPress tables and select all of them by clicking on the check boxes. At the bottom of the page you should then be able to choose the Optimize Table and/or Repair Table option. This will reduce the database size.

Disable Post Revisions

Post revision is a nice feature of WordPress but have you ever used it? I have only used it once or twice and even then it was not necessary. The problem with post revisions is that it puts a lot of additional load on your server.

To be able to open up an old post revision, WordPress has to save the old article in the database. This means that an article is put twice into the database if you have edited it twice. Think about this. Maybe you have been editing an article for a long time. Maybe there are 10 post revisions (which is not that rare) which practically means that the article exists 10 times in your database. Obviously this will add a lot of extra load on the database.

Just add this code to your wp-config.php file to disable post revisions:

<?php define(‘WP_POST_REVISIONS’,false); ?>

Delete Unnecessary Database Tables

This might be necessary since a lot of plug-ins use the database to store information. When the plug-in is no longer needed you just uninstall it, right? No. You also have to delete the entries the plug-in made in the database.

Not every plug-in does leave traces in the database but the some plug-ins do. To remove a table, log in to phpMyAdmin and select your WordPress table. Click on the check box next to the table you want to delete and then at the bottom on the page, choose the option Drop.

Be very careful about deleting tables in your database as you might end up removing the wrong table.

If you did disable post revisions it’s advisable to also delete the post revision table all together but as I said before always back up. Then enter this query to delete post revisions:

DELETE FROM wp_posts WHERE post_type = “revision”;

Prevent Content Scrapers from Consuming your Bandwidth

There are a lot of content scrapers these days. What they usually do is to visit your website and simply copy some of your content. They then go ahead and paste this content onto their own site.

The problem is that they usually also copy images which link back to your site. Every time a user takes a look at their copied content your server will have to serve the image which consumes bandwidth. This is also refer to as hotlinking.

In order to prevent this add this code to the .htaccess file in the root directory and replace the blog and image URL:

RewriteEngine On

#Replace ?mysite\.com/ with your blog url

RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]

RewriteCond %{HTTP_REFERER} !^$

#Replace /images/nohotlink.jpg with your “don’t hotlink” image url

RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]

That should prevent content scrapers from hotlinking.

"Do Not Write Another Blog Post Until You Watch This Free Video..."

Traffic Domination

Watch this free video to learn...

  • How I got over 10,000,000 people to visit my websites.
  • The types of blog post that got me all that traffic.
  • How to get someone else to do it for you!

Where should I send your video?

Your privacy is safe. We will never share your information.

How We Get Over 64.73% Of New Email Subscribers

We first added a popup opt-in box to IncomeDiary back in 2010. Today, it gets us more subscribers than our homepage opt-in, footer opt-in, sidebar opt-in and squeeze pages combined.

After seeing how well it worked for us, we decided to develop it into a plugin our readers could use. It's been so popular that over 60,000 websites now use it!

Click Here To Get Instant Access


  1. Onibalusi Bamidele says:

    This a really awesome post, Michael,

    I didn’t even know that wordpress post revision causes high server load and I will be disabling it right away (I only used it once – and that was in 2010).

    I’m using W3 Total cahce and it has also had a huge impact on my loading speed.

    Thanks so much for the awesome post,

  2. Thanks for sharing these tips! Using a Content Delivery Network is worth mentioning as a way of speeding your website, although I recommend it if you have at least 4/5 thousands visitors per day. Otherwise, it’s just wasted money, especially if you have a powerful dedicated server or even a shared hosting account at a well known hosting company.

    Regarding the “Don’t Rely Heavily on Other Websites”: it’s often better to use scripts like jQuery or Mootools that are hosted in the Google CDN. Many webmasters use it and for lots of visitors the scripts will load faster, especially if they visited sites that downloaded the scripts from the same CDN.

  3. johns onlin!!! says:

    Hi Michael
    great stuff was just looking at one of my local search sites and thinking how can i improve the upload speed as the user gets bored and moves on otherwise

    you mention to check plugins needed
    there is your next post buddy#

  4. Copywriting Services says:

    Great post Michael. I know from experience having had my main business site hacked twice, that if you don’t keep WordPress updated then it not only slows your site down – but can leave a great big hole in your online defences too. I know a lot of people think upgrades are a pain to do, but in cpanel hosts such as Bluehost, you can do several sites at the same time at the touch of a button if you make a simple back up first.

  5. Eric D Greene says:

    Excellent list! I will use most of them and already do several. I didnt know about the optimize db option in phpadmin. I also will try that htaccess rule to block content scapers.

  6. I never disable my post revision, I’m using WP-Optimize ( plugin, it have feature to delete post revision, thanks for the others I’ve never try any of these before

  7. Great Michael, I second you especially on the image path. you know, last month I reduced the number of images on one of my site and then resize the one’s i needed to be on my site and I has improved the respond very well. the site itself becomes slow.

  8. Adesoji Adegbulu says:

    I love this. Now i have more options to speed up my wordpress based blogs. I just love wordpress 🙂

  9. Thanks for sharing the post, haven’t seen something like it in a long time.

  10. Suraj Sodha says:

    Thanks for the tips dude, definitely going to use from now on and have added the Flush code in too.

  11. Strumming Patterns says:

    Great list thanks Michael, I just started a new blog and will make sure I get all these things sorted. Thanks again man, awesome list!

  12. This is a great post Michael, thanks for sharing. I’ve been doing most of these when I can for my sites but there are also some new tricks here too!

    One thing to mention is the reduction of image sizes is a very basic job but it can be kind of time consuming. This is the perfect kind of job to outsource for a small cost through odesk or similar sites, especially if you have lots of images to go through. I’ve had a couple hundred images compressed into a different file format for $10 before at the same time as I was busy writing up content for the site. By the time I was finished I had my graphics back and was ready to launch!

  13. Nitin Mistry says:

    Hi Michael,

    I did not know about the smush it! plugin – a very useful and valuable
    post. One more thing – many people try and serve media espicially videos straight from your site. This eats away at your bandwith also.
    There are plenty of techniques to prevent this and i will leave it to you Michael to explain this for all your readers because my comments will become too large…



  14. I understand the need to limit the number of plugins. I feel like I have a lot, but in reality there’s about 20, all performing specific needed tasks.

    How many do you use?
    What do you consider too many?

  15. Fazal Mayar says:

    Great post Micheal. I use W3 Total Cache and the loading speed has improved alot.

  16. Mark Thompson says:

    Awesome tips Michael.

    I do all of the above except disallowing content scrapers. I never thought about that, but I imagine they could hog up a lot of bandwidth. Nice Tip!

    Also a good rule of thumb is that if you don’t NEED a wordpress plugin, delete it. There is no sense is keeping random plugin for no reason. Before you know it you could have a bunch that you don’t use and are just slowing your site down.

  17. Gary Parenti says:

    Hey Michael ,

    Your Blog seems to be a little slow loading …
    I think it’s that pop up that doe’s it …
    I have a Vlog that loads faster than
    Income Diary …


  18. Rusty Bishop says:

    Great post Michael. Thanks!

    I like to test my site using webpagetest about once per week.

    Last week I found two css images that were missing from my database that were slowing load times dramatically as the server was looking for them constantly.

  19. Rahul Kumar thakur says:

    thanks buddy for this gr8 post.
    i use w3 cache to load it fast and evn regularly check the size of images so that it will load faster
    .evn speed test helps to find some minor problems

  20. Thanks so much Micheal. Im already implementing all your tricks and tips as we speak.

    Talk soon,

  21. Eddys Velasquez says:

    Thanks for posting this :)…
    I just downloaded some of the plugins an am already seeing some results…

    I will be messing with the code later…for the moment I don’t want to screw anything up until I learn how to mess with the code properly..

    Your Friend,
    Eddys Velasquez

  22. Thanks for this post Michael!

    I’ve been having problems with my WordPress blog before, and this is actually already working..
    It’s super fast now 🙂


  23. Tremendous post, Michael. Really appreciated. I will now spend the required time making my WP sites much better.

    Thanks to you.

  24. Great post Michael. I’ve already started implementing these tips on my wordpress blog. Appreciate it.

  25. Automated Backlinks says:

    Excellent write up Michael.

    I know from experience how much a site slows down after loading images and all sorts of plugins.

    I was not aware of the post revisions although like everyone else I’ve rarely used it.



  26. Hi Michael

    Nice work, I was having some problems with my Geegeez blog and the ‘flush’ tip has speeded up the page loads a fair bit on its own.

    I already have W3Cache and will implement some of the other suggestions when I get a chance.

    Thanks again,

  27. I really love your post. I will try to check out the info on here and apply . Thanks alot for the tip, mike. This is babs

  28. Great post, Michael 🙂 I totally forgot about PageSpeed – W3 Total Cache was a huge tip. My score went up by 15 points!

  29. Great post Michael,

    Thanks for all the handy hints. For some reason I haven’t been able to install W3 Cache successfully, it always results in an error which stops me from accessing WP admin…

  30. reviewmylife says:

    Hi Michael, you should probably mention that your ‘Prevent Content Scrapers from Consuming your Bandwidth’ tip solution has consequences!

    It may prevent Google Images (and other image search services) from downloading your images. This will mean your images aren’t in their image search engine. And therefore you may lose visitors.

    So as well as making your site faster by preventing bandwidth theft, you will also make it faster by having less visitors. Probably not what you wanted!

    I would recommend a more sophisticated .htaccess rule that also allows the popular image search services, and empty referrers to access the images.

  31. Rogerio Job says:

    Awesome tips Michael! I’m installing W3 Total Cache right now on my blogs. Thank you a lot!

  32. Patel sridhar says:

    I Think you left the WP_SUPER_Cache Plugin, that caches everything your blog renders static into a html page.

    • Patel sridhar says:

      Sorry I left to add its disadvantage, Its that I could not use it on my blog where I need it to render the inhouse widget peerfly top offers listed dynamically. It shows full page html source code if used.

  33. Robert Simpson says:

    Hi Michael,

    What a fantastic post this is…

    As an Internet and Affiliate Marketer I’m forver adding scripts and other load bearing stuff to my blog and have really been experiencing slowmo syndrome with my blog recently.

    I can’t thank you enough for this very helpful post to help speed up my blog. I’ll be back to post my thankyou’s as soon as I see the results which are sure to take place.

    Robert 🙂

  34. Very helpful post Michael!
    Thanks! I’ll definitely include the above-mentioned WP speed-up tips on my newly set-up site. 🙂

  35. Great post Michael.
    We are about to start using WordPress for our blog, and load speed is such an important factor, not only improving SEO but also for stopping bounces.
    With regards to plugins, how many plugins is too many? (if all plugins are adding something to the site?)

  36. harvestwages says:

    Hey Michael,
    Nice post, i’m glad you mentioned ‘wordpress update’. Many bloggers ignore updates, some even turn it off with use of a plugin.

  37. Awesome post Mike,
    I will apply some of these tips now. Thanks so much for sharing. Have fun 🙂

  38. Jacob Mercer says:

    This is really cool! After reading this post, I’ve realized that I am still a beginner. I wish to learn more from you and this site. I already bookmarked this page and will read all of your post. Now I know how to speed up my wordpress.

  39. Internet Geeks says:

    Hi Michael,

    Nice post as usual, I tried lots of this at my blogs and would like to contribute to your list.

    You can also include Cache plugins like Quick Cache or W3 Super Cache.

    Thanks for providing no BS useful content.

  40. Jonathan - Advanced Life Skills says:

    This is just what I was looking for Michael. Smush it is working fine in new uploads but when I try to use it manually in my media library it just redirects to my home page for some reason.

    Do you prefer W3 Total Cache to WP Super Cache?

  41. that is really amazing information but if you can tell me any free wrodpress plugnin to optimize date base?

  42. WordpressGuy says:


    This is one complete article that every aspiring IM’er should read. You did a great job covering the “forgotten” tricks to improve a site!

    Like it!

  43. Bj Bryen says:

    Hi Michael,

    Thanks, very, very useful tips. In fact there are a couple of real gems I will be trying.

    Would be great to read what your recommended plugins are. I’m very wary about the over use of plugins, but it’s a bit like a kid in a candy store, they all look appealing.

  44. Chad Nicely says:


    My Friend, Awesome post. I am definitely going to check out W3 Total Cache,as well as Smuch. You stated it is important to scale the photos in photoshop or some editing program. So it is not ok to just scale it down in the blog itself? I usually just scale it down to 70% but you are saying it is still keeping its original size?

    You do Great Work, I’m a frequent flyer!

  45. Fazal Mayar says:

    I would like to thank you for this post again as I use Wp-Optimize and it deletes useless spam comments, post revisions and,etc. TREMENDOUS plugin!

  46. Sebastian says:

    This is a great article. However, on your advice I added

    to my wp-config.php to end post revisions and messed up my entire site. I don’t know if it is the theme I have but I am not sure where exactly to insert this code. Any advice or points on where and how to insert this code?

  47. Will Fischer says:

    Still a very useful article! Only except for W3 Total Cache I would use WP Super Cache ( ) as to me it’s slightly more reliable.