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 bench-marking 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
You can use a combination of the following tools/options to measure the performance of your site.
1) PageSpeed Insights
I use the PageSpeed Insights tool from Google to measure performance and try to achieve a score of 80+ out of 100. PageSpeed Insights analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.
2) YSlow
You can also use YSlow addon for Chrome or Firefox to measure the page load time of a site. YSlow has an add-on integrated with the Firebug web development tool.
The site in question takes about 23 seconds to load which is not a very good page loading time. Some optimization could help!
3) Manual Observation
You can also use the stopwatch on your computer (or an online one)Â to test how long it takes to load a webpage.
4) Database Queries
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:
Make sure the webpage is not making any unnecessary database queries.
5) Speed Tester
You can use the website speed tester to find out how fast your site loads.
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 pretty good… even I use it 🙂
- Optimize your images so they load faster.
- Kill some plugins that are unnecessary or doesn’t add much value to your site (disable or delete these plugins).
- Optimize and Repair your Database from PHPMyAdmin. You can use the wp optimize plugin that does this for you.
- Check your theme Code (use good themes with valid HTML code).
- Get good web hosting.
Intermediate to Advanced Optimization Tips
- Use a good hosting provider (preferably not a shared hosting).
- Keep your page sizes less than 200kb. Do not use too many unnecessary images and videos 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 sub-domains to share the load).
- Load javascripts in the footer (The golden rule – CSS on top, JavaScript on bottom).
- 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.
- Use external scripts. Instead of placing tons of code in your header.php file, put the code in 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).
The plugins to speed up WordPress site article is also a good read.
I am using W3 Total Cache. it awesome. thank you so much for sharing.
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.
@Tomas, if you are using the W3 Total Cache plugin then don’t worry about the PHP speedy plugin.
Will you advise using the php speedy plugin even while the w3tc plugin is activated?
Thanks
Page loading time is obviously an important part , Google webmaster tools records and graphs it
Thanks for the share
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.
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.
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!
Awesome tips. It made a huge difference on my site. Any ideas how to apply CSS sprite?
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.
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.
wp cache is good plug in
Also the css and js can be compressed
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.
Try using DustMe CSS Selectors for identifying unused CSS selectors
yslow and pagespeed are great tools
been working on site speed for years; only recently have its benefits been proven
A+
HI,
It is just not try. But it really work to make fast speed in php. Thanks Guru.
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.
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 !
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!
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!
Some excellent optimization tips here. Something that so many web designers overlook and yet one of the most important points.
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.
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!
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.
Nice, Tried out the PHP Speedy, helped alot. Thanks
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
you are awesome man given such a good post, it helps me a lot for my blog
thanks
Nice one , i will implement it on my wordpress blog
We all have a plenty of time, but we never have enough. The maximum time to load a website is 2 sec max.
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!
I use also min, details http://groups.google.com/group/minify