WordPress Optimization Tips and Tricks for Better Performance and Speed

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.


How to Measure the Performance of a Site

1. I use the Page Speed tool from Google to measure performance and try to achieve a score of 85+ out of 100. Page speed has a browser addon to measure the performance of a site. Page Speed analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.

2. You can also use YSlow Firefox addon to measure the page load time of a site. 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.


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

3. 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.

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


Website Speed Tester

5. 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 wp optimize plugin that does this for you.
  • Check your theme Code (Use valid HTML code)
  • Get a Good hosting

Intermediate to Advanced Optimization Tips

  • Use a good hosting provider (preferably not shared hosting)
  • 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.

Found this article interesting? Subscribe to Tips and Tricks HQ

email icon rss feed icon twitter icon google plus icon

Comments (103 responses)

  1. Ettitude says:

    I am using W3 Total Cache. it awesome. thank you so much for sharing.

  2. Result First says:

    These techniques are good for reducing the load time of page which is also ranking factors. People generally ignore these tips above but must do for making a website user friendly.

  3. admin says:

    @Tomas, if you are using the W3 Total Cache plugin then don’t worry about the PHP speedy plugin.

  4. Tomas says:

    Will you advise using the php speedy plugin even while the w3tc plugin is activated?


  5. murtaza says:

    Page loading time is obviously an important part , Google webmaster tools records and graphs it

    Thanks for the share

  6. Brandon says:

    Adding the future expires header to all the images in my images folder really improved my Google page speed score. I just put a .htaccess file directly in the images folder. Thanks for all the tips.

  7. poptropica says:

    Thanks for sharing your tips and tricks. Speeding up you website is the best way and one of many ways to put you on top on search engines. brilliant job admin. Totally admirable article. I appreciate your work.

  8. Sandy Allain says:

    These tips are awesome! While most people would just hire a seo consultant and leave all the work to him, it often results in a clunky site as the consultant works on promoting the site and not optimizing it. That causes the users to experience more lag when the number of visitors increase and nothing is done about the site. Cheers to an optimized website for everyone!

  9. Videos2worship says:

    Awesome tips. It made a huge difference on my site. Any ideas how to apply CSS sprite?

  10. Leet Computing says:

    First of all… very good tips! you wrote this a while back but it all still very useful. I too love W3 Total Cache. I used to use WP super cache but i found it buggy. I definitely would say that site performance is quite a strong factor now in google’s algorithm as i’ve been tweaking the hell out of my sites for more speed and have seen a pleasant rise in rankings.

  11. film streaming says:

    Thanks for the tips & tricks.
    Don’t forget that two other major speed factors of a website (not just wordpress) are the geographical location of the server, and the actual speed of the server.

  12. murtaza kanpurwala says:

    wp cache is good plug in

    Also the css and js can be compressed

  13. Ben Smith says:

    I tend to make sure images are well optimised but still look good, as you still need to showcase your products / services. Ive never heard of YSLOW, I use Googles Page Speed tool, but I will give it a try as Im using FF more now.

  14. Josh says:

    Try using DustMe CSS Selectors for identifying unused CSS selectors

  15. web design says:

    yslow and pagespeed are great tools
    been working on site speed for years; only recently have its benefits been proven

  16. Sean says:

    It is just not try. But it really work to make fast speed in php. Thanks Guru.

  17. Mcneri Tech and Public Health Blog says:

    Thank you for such a comprehensive and concise post. You have touched on a lot of the things I have implemented or tested in the last two weeks since I converged my blogs into one megablog. I like WP Supercahe and WP total cache. They are works of art equivalent to Michelangelo! You did not talk about Yottaa, a service that monitors websites and evaluates them based on various benchmarks including YSlow. I have been toying with it these last few days too. Another relatively new service is Incapsula, a reverse DNS provider and Cloudflare, another reverse DNS provider. They help by caching some of your files offsite and distributing these files from their various servers across the globe. An additional thing that I noticed especially with Cloudflare is that at the medium setting, Akismet goes on holiday. It filters quite a number of spam IPs and spam bots.
    Thank you for your great website and blog articles.

  18. Freeview Recorder says:

    Thanks for the tips & tricks.
    Don’t forget that two other major speed factors of a website (not just wordpress) are the geographical location of the server, and the actual speed of the server.
    A cheap webserver at the opposite end of the earth to the main users of the website is not a good idea !

  19. khasiat madu says:

    I am a WP user and found your tips very useful. Maybe it is useful to list of all the variables (including the location) where the tweaks can be made too. My site loading time improved from average 2.6 seconds to 1.8 seconds!

  20. Colorado SEO Consultants says:

    While my site isn’t too heavy, we still had some annoying lag issues, which is not what you want clients to see as a first impression. I followed your advice elsewhere on this blog to minimize simple PHP queries and I cannot tell you what a huge difference it has made in overall page and total website load times. Thanks for that and all the other suggestions you’ve posted. Your blog has been a huge help with our optimization!

  21. Some excellent optimization tips here. Something that so many web designers overlook and yet one of the most important points.

  22. Steve says:

    These are great tips! I use Total Cache but I haven’t heard of a few of the other tips so thank you for sharing.

  23. Mark Sim says:

    Yslow is a great tool for checking the speed of a WordPress website. Always make sure that you have the latest version from WordPress.org. If you have an old version, chances might be your site will run slower so be sure to upgrade! Anyways, there are many useful tips here and they are guaranteed to work. Thanks for sharing some WordPress optimisation tips and tricks. Really appreciated!

  24. Mahadir says:

    I just installed W3 Total Cache on my WordPress blog. Thanks for this nice article. But I think WP Super Cache also a good plugin for speed optimizer, I’ll try know using W3 Total Cache and compare the difference.

  25. Louis R. says:

    Nice, Tried out the PHP Speedy, helped alot. Thanks

  26. Willie says:

    Hey man thanks for this great list! I actually haven’t been using any of these on my wordpress sites and I should be, my load times for my pages are sometimes just nasty and it has to change. I’m gonna put some of these tips to good use. Thanks!

    – Willie P

  27. Ashton says:

    you are awesome man given such a good post, it helps me a lot for my blog

  28. murtaza says:

    Nice one , i will implement it on my wordpress blog

  29. Converse All Stars says:

    We all have a plenty of time, but we never have enough. The maximum time to load a website is 2 sec max.

  30. Hi, I’m always using a wordpress CMS to build a website. Easy to use, but sometimes a little bit slow to load a page. Thanks for your tips!

  31. joomla says:

    I use also min, details http://groups.google.com/group/minify

  32. Please,please,please do a tutorial about setting up wordpress in combination with for example amazon cloud servers…!

  33. I would also invest more time to understand and use tags and category than anything else; so many WP pages have useless tags which end up being confusing and do not allow a reader to find what they want at all.

  34. The quicker the page, the better. Im using WordPress, but for me it’s taking too much time to load a page. I have to work on it.

  35. elle says:

    Great tips! I really learned a lot from this post, thanks again.
    Bargain Outlet

  36. admin says:

    I prefer to host the frequently used images on a cloud server because then the browser can do more parallel operations which gives you a slight performance boost.

  37. Is it better to host videos/ images on your server or is it better to use a cloud server like amazon or something?

  38. Nicole Powel says:


    thanks for the tips, my website is just too slow, according to what I would like. I need to check how quickly does the page load.
    Do you know how to optimize Magento?

    best wishes

  39. Akash says:

    Nice article . :)

  40. James says:

    Thanks for the tips. With the way Google is now giving more credit to sites that are faster, this helps a lot. For having a well groomed, fast site, Google might knock you down in the rankings.

  41. Michael says:

    Great tips on how to optimize my WP website.Thanks for all of your hard work!

  42. Tony says:

    Speed is very important. It is also an indicator of how important it should be according to some.

  43. William says:

    Hello, many, many thanks for taking the time to share.. It was useful for my team. Thanks for all of your hard work!

  44. Aankomsttijden Schiphol says:

    I think website speed is so overrated…i have never had problems with my rankings and the speed factor..

  45. Thanks for the “Basic WordPress Site Optimization Tips and Tricks” Will try them out!

  46. Paul Web says:

    Good pick with Yslow, it’s an excellent tool and I’ve used it for years to check the load speed and slow loading bits of my websites. It’s literally saved me tens of hours trying to find the best ways to tweak the speed of individual pages, and probably saved hundreds of hours of load lag!

  47. koronis says:

    Your suggestion on reducing the number of plugins brings to mind the possible advantages and positive impact that the new SEO all in one plugin from Yoast will have on improving site speed. Combining 7 popular and commonly used plugins into one plugin has to be a good move. I’m curious if anyone here has any experience with the new plugin still in Beta, but looking pretty solid.

  48. hello!

    I am impressed by the list. I totally agree that nowadays the speed of the website is quite important. So many new sites are build every single day, and even small issues matter. Your article reminds me of the famous 6 seconds to death. It takes 6 seconds to decide whether to stay on a site or not.
    Thanks for the list, I will definitely use it.


  49. Normally when starting wordpress optimization site speed comes to mind but php themes are usually slow if not customized.

  50. Gerry says:

    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.

Speak Your Mind