WordPress Optimization Tips and Tricks for Better Performance and Speed

Categories: Blog Setup, Featured, Site Optimization Tips, Wordpress

Is your WordPress blog performing at it’s best? How quickly does the page load? Is it sluggish? Your website’s performance is one of the key factors in ensuring that the visitors are having a good experience with your site. So I personally think it is worthwhile to spend some time tuning/optimizing the site for performance. In this article I have listed various tips and tricks on how to speed up a WordPress Site.

Before diving into the optimization tips and tricks I recommend measuring the current performance of the site so you have some benchmarking figures to compare against after you make the changes and see how it has affected the performance.

wordpress-optimization-tips-post-icon

How to Measure the Performance of a Site

1. I use YSlow Firefox addon to measure the page load time of a site. YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages. YSlow is a Firefox add-on integrated with the Firebug web development tool. So to use YSlow you will have to get the Firebug addon and then install the YSlow addon.

website-optimazation

The site in question takes about 23 secons to load which is not a very good page loading time. Some optimization could help!

2. The number of database queries a webpage makes to load the page have an effect on the page load time. You can use the following piece of code in the footer of your theme to find out how many database queries a page is making:

<?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.

Make sure the webpage is not making any unnecessary database queries.

3. You can use the website speed tester to find out how fast your site loads.

speed_test

Website Speed Tester

4. You can also use the stopwatch on numion.com to test how long it takes to load a webpage.

Basic WordPress Site Optimization Tips and Tricks

  • Upgrade to the latest wordpress release (you should be doing this for security reasons anyway)
  • Use W3 Total Cache WordPress plugin (Forget WP Super Cache). W3 Total Cache is just awesome… even I use it :)
  • Minimize simple unnecessary PHP queries. For example, instead of using <?php get_bloginfo(‘wpurl’); ?> just replace it with your wordpress installation URL so the browser can simply read it instead of making a query.
  • Load javascripts in the footer (The golden rule – CSS on top, javascript on bottom)
  • Kill some plugins that are unnecesary or doesn’t add much value to your site (Disable or delete these plugins)
  • Optimize and Repair your Database from myPhpAdmin. You can use the Optimize DB plugin that does this for you.
  • Check your theme Code (Use valid HTML code)
  • Get a Good hosting

Intermediate to Advanced Optimization Tips

  • Keep your page sizes less than 100kb. Do not use too many unnecessary images and video on a page. Always compress the images appropriately.
  • Combine css files into one big css file (One 50kb file loads a lot faster than five 10kb files)
  • Combine javascripts into one big file.
  • Reduce the number of dynamic PHP and http calls (Use subdomains to share the load)
  • Use external scripts. Instead of placing tons of code in your header.php file, use external scripts. This allows the browser to cache the script so it won’t have to read it for every other page.
  • Add far future expires header to images, CSS and javascript files (How to Add far future expires header).
  • Don’t use ETags unless you are taking advantage of it (How to configure ETags).

You can use the PHP speedy WordPress plugin which takes care of few of the tips mentioned above. The Plugins to Speed Up Your WordPress Site article is also a good read.

  • Share/Bookmark
Tags: Site Optimization Tips, Web development, Wordpress, WordPress Tweaks

Similar posts that you may like

Subscribe to Tips and Tricks HQ to stay informed

twitter_icon

33 Comments (and 15 trackbacks)

  • #1 by Dimmka on May 30, 2009 - 5:12 pm

    Как по мне – тема раскрыта четко, спасибо за пост!

  • #2 by Towel on May 31, 2009 - 12:21 am

    I’ve just noticed a couple of url requests same you mention: and a couple of similar in one of my ‘on the fly’ scripts so must look at replacing for the hardcoded domain/URL there.

  • #3 by George Serradinho on June 12, 2009 - 2:29 am

    Hi,

    thanks for this, really needed to check how my site performs.

    I used the speed test from iwebtool and my site’s home page loaded in 1.22 seconds.

  • #4 by DDlinks on July 14, 2009 - 2:23 am

    thank u for the great tips

  • #5 by JaY Srivastava on September 12, 2009 - 2:05 pm

    Simply Awesome, Thanks i have used some of them on my website as well

    Thanks.
    JaY Srivastava´s last blog ..Dell 9.99mm Adamo XPS ultraportable teaser kicks-off My ComLuv Profile

  • #6 by Bill on November 7, 2009 - 4:33 pm

    got a need for speed using web optimizer and hyper cache with thesis 1.6 Yslow 88

    Gunning for 90+

    I saw a post here that I cannot find with the specific instructions on how to transfer css to one file but cannot find it now. please advise. wonder if this can be employed in custom.css within Thesis (asking them)
    Bill´s last blog ..Republican Women Convention, Nov 13-15 My ComLuv Profile

  • #7 by janice on December 8, 2009 - 11:18 pm

    Nice article – the web optimizer seriously broke my site, wouldn’t touch it again. WPCache works well for me.

  • #8 by Keith Davis on December 21, 2009 - 2:56 pm

    Google Webmaster tools now has a section for page upload time.
    I checked all my html sites and they were all super fast.
    My WordPress site was super slow. What a disappointment after all the hype about WordPress.

    I’ve just started looking round for tutorials giving advice on speeding up WordPress sites and came across this post.
    wp super cache seems to be the plugin that everyone uses…. will probably start there.
    Keith Davis´s last blog ..The eyes have it! My ComLuv Profile

  • #9 by hotels in Turkey on December 30, 2009 - 5:27 am

    website speed tools should be like this. very useful and easy…
    hotels in Turkey´s last blog ..Buying Properties in Turkey | 2 Star Hotel for Sale Turkey | Turkish Hotel Buy | Marmaris My ComLuv Profile

  • #10 by Bill on January 10, 2010 - 6:17 pm

    Really informative , being a beginner i learn many things from it. thanks for sharing it.

  • #11 by Amal Roy on January 31, 2010 - 9:23 pm

    Now Thats what i call pro tips. I have implemented ome of theme in my site. I it loads really fast now.
    Thanks Friend
    Amal Roy´s last blog ..How To Update Kaspersky Manually / Offline (without Internet) Step By Step Guide My ComLuv Profile

  • #12 by 搞笑图片 on March 1, 2010 - 12:45 am

    Thanks for the optimization tips.
    The Yslow is the best

  • #13 by Webdesign Roosendaal on March 4, 2010 - 12:57 pm

    Nice. I’ve done some research in optimizing Apache servers and here are a few tips to Google more about:

    - turn off eTag. It’s mostly used to put an extra label on images, but the Last-Modified header can be used for that.
    - turn on GZIP, but make sure you put some exceptions in the code for users of IE6.
    - turn on Cache AND Expire headers. It’ll save you a lot of traffic.
    Webdesign Roosendaal´s last blog ..Professionele presentatie bouwbureau Holm de Jong My ComLuv Profile

  • #14 by Jason Saggers on March 30, 2010 - 2:03 am

    Some very good tips there, I also find that it also comes to to a good host also.
    Jason Saggers´s last blog ..My new slim PS2 My ComLuv Profile

  • #15 by Athena on April 8, 2010 - 5:17 pm

    Thanks! :) Great blog post loaded with tons of info.
    I’m going to Share.
    Athena´s last blog ..A Dream Comes Alive This Week My ComLuv Profile

  • #16 by Gerry on April 16, 2010 - 12:16 am

    I have had great results with W3-Total Cache. Probably due to “operator error” Super cache took my VPS down, and W3 Total Cache was an easy setup, and reduced the bandwidth required to almost half on one of my sites. Looks like a Cache of some kind is going to be mandatory going forward.
    Gerry´s last blog ..Unlocked Palm My ComLuv Profile

  • #17 by Richard Cummings on April 22, 2010 - 3:40 pm

    As Google more and more is placing SEO value on the speed at which your website responds, these strategies to “speed it up” are becoming more and more valuable.
    Richard Cummings´s last blog ..SEO: Error Traffic Control My ComLuv Profile

  • #18 by Alex on April 28, 2010 - 1:26 am

    Hello, thanks for the tips. I installed that add-on to my Firefox to check speed on my sites. Will tweak a few things to improve speed. Greetings, Alex.
    Alex´s last blog ..Happy birthday to WpThemesPlanet! My ComLuv Profile

  • #19 by brian Cee on June 1, 2010 - 5:36 pm

    Really impressed with this tutorial, it’s so quick and simple and you can see the results straight away!! I’ve always used WP Super Cache and a couple of other plugins but W3 Total Cache is sooo much better!

    Great Work Cheers brianCee
    brian Cee´s last blog ..brian Cee’s Weekly Twitter News My ComLuv Profile

  • #20 by şirket rehberi on June 7, 2010 - 4:39 pm

    we are always need this kind of informations on the web.. so thank you for your time…

  • #21 by John Media@dedicated server on June 8, 2010 - 8:18 am

    Wow great tips on how to optimize my WP website. Thanks for this post I learned many different techniques on using and coding with WP.

  • #22 by Mike on June 10, 2010 - 10:37 pm

    Site speed is huge right now especially with google making changes the wordpress cache plugin works great, thanks for the post.

  • #23 by marmaris ucuz otel on July 3, 2010 - 5:52 pm

    I coded this to my web site footer .. queries in seconds. but didnt work.. maybe I did something wrong..

  • #24 by noeal on July 26, 2010 - 6:54 am

    u know now google is also considering loading time of a site as factor for SERP results in Google Search Engine……, this is what was new update by Google on Caffiene update
    noeal´s last blog ..Texas State Driving Record Site Map My ComLuv Profile

  • #25 by Scott McLay's SEO Blog on August 4, 2010 - 4:15 am

    Just came accross this post, since this was posted alot has been said about website speed especialy from Google. WordPress is a great platform, although most themes are not that well optimised for speed, a few things can be done to combat this though.

    1. Host most resources (images, css, javascript) on a subdomain – browsers can only download upto 4 resources per hostname.

    2. Minimise HTML, CSS and JavaScript – removing whitespace can reduce file size.

    3. Properly optimise images in terms of file size

    for more information on this please see this post – How to optimise for speed
    Scott McLay’s SEO Blog´s last blog ..Quick Update – Domain Name Change- Time Constraints &amp Current Projects My ComLuv Profile

  • #26 by Сантехника on August 5, 2010 - 2:06 pm

    We are always need this kind of informations on the web.. so thank you for your time… Thanks

  • #27 by webdesign meppel on August 6, 2010 - 8:05 pm

    Seems like site speed and performance is getting more and more important for search result rankings, so very usefull post!!
    webdesign meppel´s last blog ..Bloggen voor een betere ranking of voor meer bezoekers My ComLuv Profile

  • #28 by Michael Bryson on August 8, 2010 - 8:01 pm

    Nice tips on speeding up your website. I am currently using the w3 total cache plugin and find it unbelievable. One thing you missed was serving your images via a cdn. I use amazons cloudfront with w3 and its brilliant at serving images, css and js files.
    Michael Bryson´s last blog ..Choosing The Right Fitness Clubs My ComLuv Profile

  • #29 by Paul on August 10, 2010 - 3:31 pm

    Great set of tips. I recent switched to W3 Total Cache from WP Super Cache and I love it. The options, such as minify, you get with W3 Total Cache just make it so much better.

    I use YSlow a bit, but will be reviewing my site to see if where there is room for improvement.
    Paul´s last blog ..Speed Up Your Web Site By Using CSS Sprites My ComLuv Profile

  • #30 by ixwebhosting review on August 18, 2010 - 2:00 pm

    One of the biggest performance boosts you can get from an application running on PHP is to install APC (Alternative PHP Cache) or any other opcode caching program. This caches the compiled binary PHP code in order to process future requests much faster. Best of all it requires no change to the PHP code to benefit from the speed.
    ixwebhosting review´s last blog ..IX Web Hosting Review My ComLuv Profile

  • #31 by Martyna on August 25, 2010 - 9:48 am

    Hallo

    Thanks for the list. I will start with the YSlow. You mentioned that the traditional cache is slow. and proposed the W3 TOTAL CACHE. Do you know a new version of it that works well the the updated versions of WordPress and Thesis?

    have a great day, best,
    Martyna
    Martyna ´s last blog ..The Leadership Skills of the Future Part II My ComLuv Profile

  • #32 by admin on August 25, 2010 - 10:48 pm

    The latest version of W3 Total Cache works nicely with WordPress 3 and Thesis.

  • #33 by Gerry @ Finest Laptops on August 25, 2010 - 11:00 pm

    Couldn’t agree with you more on the suggestion to use W3 Super Cache. I had all kinds of problems with Super Cache and the installation of W3 Super Cache made a significant difference in load time and bandwidth used. As a suggestion anyone installing it check your bandwidth used in your cPanel AWSTATS and you will see what I mean. Thanks for the great tips.
    Gerry @ Finest Laptops´s last blog ..Laptops Under 1000 My ComLuv Profile

CommentLuv Enabled

Featured & Popular Articles

Tips and Tricks Hot Items

wordpress_estore_icon
wordpress membership plugin
WordPress PDF Stamper Plugin
WordPress Affiliate Link Manager Plugin
wordpress_affiliate_plugin_icon