WordPress Guide: Howto Force Your Blog Load Fast
Load time of the WordPress blog is one thing that many bloggers strive to achieve in order to sustain the mass number of visits. And while we do have some control over some of the factors that can greatly help you speed up your blog - you will need to make decisions you might not like …
In this post I’m not going to cover detailed info on caching etc. There are plenty of other posts that explain how to create a minimalistic WordPress blog that loads super fast. I’m here to share how to run a Web 2.0 enabled WordPress blog and still have it load reasonably fast!
Before I even begin to talk about the ways to speed up your blog I want to mention one thing that is perhaps the biggest determining factor for your blog speed.
- Good Hosting. Not all hosts created equal and when it comes to shared hosting - you will find that one host greatly differs from other. I personally tried several and right now I’m sticking it with Hostgator, who provides one of the best combinations of dependability, support and uptime for a shared hosting. While VPS (virtual private server) with dedicated bandwidth and resources is even better option - truth is that majority will not need it r can’t afford it. This blog is used as testbed for my own product and I run it on shared hosting for one main and biggest reason - I need to be able to test something that I share with my customers in Real Life Environment Under Similar Conditions!
With that being said - I choose Hostgator because so far it has proven to be stable, reliable and cooperating Host!
Say NO To Caching Plugins!
Are you surprised? The beauty and flexibility of the WordPress lies in its ability to instantly deliver a user generated content (comments, feedback, rating, etc). While caching can be a solution for the short periods while your blog is overrun by traffic from Digg or Stumble, if you have to do it on permanent bases I would start looking for a new host as it means you get enough traffic to generate income and afford a VPS or a more dedicated hosting.
And here is why I say it.
Many plugins rely on most current data and using caching plugins simply makes them generate incorrect values or simply force them to stop working! A few examples of that would be Popularity Contest, Dagon Design Form Mailer, Post Ratings, etc … Any plugin that would need latest and most current data. If you don’t use them you might be ok.
Set Baseline
Page load time greatly depends on factors directly impacting the person who is trying to access it, such as Internet Connection speed, how modern is the computer, how modern is the software needed to access the site. Also additional factors on your blog greatly impact the speed and something I can’t help you with outside of giving some generic advise: size of the images used on your blog, number of external widgets used in sidebar, number of external scripts running on your pages…
But there is a way to determine “independent baseline” you can use to actually KNOW how fast your page is loading. We will base it on the speed of page being generated on your server. With all other factors out of the view - How Fast Does Your Host Generate Your Page is one aspect that will be constant to all and one we will use for our optimization.
If you look at the source code of any page on my blog - at the end you will find this info (see image below):

And here is an explanation to what you see:
- Number of queries to database that had to be made in order to generate that page
- How many seconds it took the server to perform the queries and then generate the page.
In order for you to establish similar Baseline you will need to open Admin->Presentation->Theme Editor-> footer.php and add this line right before </body> closing tag:
<!– <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. –>
Please do not Copy/Paste above but type it out in notepad for the code to work!
Optimize Your Plugins
I love plugins and in my personal opinion without them WordPress would not be same platform and I would probably never use it. Plugins are what turns your blog into a more interactive platform, enhanced existing functionality and even introduces opportunities that didn’t exist before…
But plugins are also what is greatly responcible for the extra time in loading speed. If you are forced to evaluate ways to speed up your blog - plugins are on of the areas you can use to control it. As you activate plugin several things CAN happen (not always) :
- Each plugin will make queries to database, adding to load speed and time required to generate the page
- Some plugins will insert Javascript into header, this adds to general page load time
- Some plugins will insert CSS styles code or link to stylesheet into header, also adds to general load time.
You have several options here. You can deactivate all plugins and then activate them one by one and after each refresh your baseline page and see how it impact the number of queries and generation time or you can deactivate one plugin at the time and then do a few refreshes of baseline page.
Try to identify plugins that add the most to number of queries and load time. Even if you don’t disable them right now - you might do so later… at least you will know which are the resource hogs on your blog.
Optimize Your Widgets And Sidebar
As you do your testing you will find that External Code or just external widgets are the biggest offenders when it comes to load time of your blog.
- While this decision is entirely up to you - I recommend you have a long and hard look at what widgets with external code you MUST have on your blog…
- If possible, optimize ads to display images locally. If you are using Sponsor ads, see if you can obtain the image that sponsor wants rotated and have it displayed from your server. This will reduce the load time quite a bit if the option is OK with the sponsors. Sometimes they test the results and wouldn’t want to allow you that.
- Optimize your images for size. Using some form of software to optimize your images for the web is a must. Sometimes a differences that you can hardly see with an eye can reduce the file size by twice when properly done. Analyze your pages and see what images are there and if there is a way to optimize them.
- Evaluate Internal Widgets. Some widgets we use to display content for the internal pages can add quite a few queries to database and simply removing one widget can cut the load speed. This is the time when you have to evaluate the functionality versus the speed. Experiment on your blog and see how each widget impact the number of queries and load time and then decide if its a keeper or should be gone.
Few Other Tricks
While what I have described above should help you get started there are a few more advanced options available. Some of them were covered by me previously and some were written by other authors and well worth your attention if you are looking to add some speed to your blog:
- Using FeedBurner PRO Stats? Give Your Blog HUGE Speed Boost! In this post I discuss how you can speed up your blog IF you are using FeedBurner stats package.
- 2 Things I Hate About WordPress And How To Turn Them Into Your Advantage is a post where I discuss how to use WordPress database maintenance to greatly increase loading speed of your blog.
- Howto Design WordPress Blog To Survive The Digg is a post that discuss how t deal with extra traffic to your blog.
- 13 Tags to Delete From your Theme is a great post by Pro Blog Design that discusses how to replace tags in your theme with their static definitions to improve load time.
- The 3 Easiest Ways to Speed Up WordPress post on Lorelle Von Fossen blog is a great tutorial that expands on many concepts of optimization and makes it simple for ya
- Howto Move WordPress To New Host - if you actaully have decided that this is an option for you, use my guide and move your blog safely to a new host without any downtime.
Article Series:
WordPress Guide
- WordPress Guide – Dissection Of File Structure
- WordPress Guide - Dissection Of WordPress Theme
- WordPress Guide - Customizing WordPress Theme Part 1
- WordPress Guide - Customizing WordPress Theme Part 2
- WordPress Guide - Customizing WordPress Theme Part 3
- WordPress Guide - Enhancing Image System
- WordPress Guide: Howto Force Your Blog Load Fast
- WordPress Guide - Installing Plugins And Themes
| 2.5 |
If you're new here, you may want to subscribe to my RSS feed. Or click here to learn What is RSS And Why You Should Subscribe. Thanks for visiting!
Related posts
If you like this post subscribe to Full Text RSS feed and read news at your leisure or get daily posts conveniently delivered to your inbox by Subscribing via Email (requires confirmation)
Technorati Tags: howto, howto-guides, WordPress, wordpress guide, wordpress-plugins





















So glad you posted this, Alex.
Especially the code to display loading speed. Assuming you are
happy with your loadtime figure above, my webhost is doing
well for me.
Thanks
Gary Harvey
Find Hot Markets Blog’s last blog post..CPA Goldmine
Good stuff Alex, thx!
Thanks guys,
Keep in mind that load time can greatly differ on host, time of day, etc … there are just way to many variations to be able to predict them all.
Goal of this article was to help you make your own decision based on performance. It is also assumed that you will do the due diligence and test your blog at different times and under different conditions.
Alex
I dumped my caching plugin the first time I used it.
I asked myself why my layout wasn’t changed after I altered my css. Centuries later -luckily, I’m smart enough to- found out that I had been staring at the cached version all those time!
Louis Liem’s last blog post..Google Myths - Are Any of Them is True?
Alex, This is great information. Using the load time baselining tip you gave, I found one plug-in that was adding a whole 1 second to my load time. It might not seem like a lot, but when you go from 1.3 sec load to 0.3 sec load, it is.
Thanks!
Charly.
Thanks guys,
glad my free guide is helping people
Alex
I just added this article to the ToDo lists of all my WP blogs. I wish every WP theme designer/widget developer would read this guide before going to work.
Malte Landwehr’s last blog post..Wohin steuert eBay?
One thing I should have mentioned here:
Remove the code I provided when done!
Just a reminder that once you are happy with your blog optimizations results, remove the code as it ads 2 more extra queries to database - that gives you a chance to gain some more speed.
Alex
Great Post!
I use HostGator too and they’ve been pretty good. There are times when my server seems to be more bogged down than others. I assume its the other sites on my server and I guess that’s just something you’ll get with any Shared Host service.
My theme has the same out for the baseline as yours, but it was already there - I didn’t have to add it. I think I’ll leave it as I like to keep an eye on it…
When people are checking the baseline, one tip is to check a post with a lot of comments. Sometimes a post with only a few comments is nice and quick, but one with a lot of comments is slow…
A blatant plug: If external widgets are slowing down the page loading time, you may like to check out my IFrameWidgets plugin. This will add a little more processing to the server, but will help the browser load the page faster once it’s been served.
Stephen Cronin’s last blog post..New WordPress Plugin - KeywordLuv
Thanks Stephen,
I don’t know about iFrame but your KeywordLuv is definitely worth mentioning and I just posted about that plugin!
Alex
I added the php code to the footer to check the queries and load times. My load time has been very slow using godaddy.com with shared hosting. I just turned on the wp-supercache plugin and it seems to be helping tremendously. Wouldn’t adding the extra queries to the footer to check the load times actually slow down your load time?
ElectroGeek’s last blog post..Raon Ultra Mobile PC Weighs only 1 Pound
Yes, adding code would add to queries. That is why I stated to remove it AFTER you are done.
wp-super-cache is great but I don’t like using it and I don’t think under normal conditions it should be used.
Alex