Best Results for Your Time – Speed Optimization for WordPress

Here are a couple of the steps that are free and will improve your website’s loading time by many seconds in most cases with a few minutes of work.

Website speed has been a concern for me since the end of 2010. I can’t remember exactly when but at some point Google said that website speed is now a ranking factor and ever since everytime I would get some sort of ranking decrease I would often believe it was my website’s slow loading speed that was the reason. WordPress blogs usually start at a disadvantage on this compared to normal html blogs or websites that simply have less lines for a web browser to load.

How to measure your website’s speed

To start off with, to analyze my website speed I have used both http://loads.in/ and http://gtmetrix.com. The first one is really detailed and allows you to setup a region and browser to test your website’s loading speed. However, it keeps the results for 24 hours for a specific region/browser so I usually have to note the time and test it again the next day (or use a region test that is very close with the same browser). I love http://gtmetrix.com because it if you clear your caches (more on that later) you can immediately see the difference in speed after your changes.

The four simple steps that make the biggest difference

1) The first thing you want to do is get the plugin W3 total cache if you do not have it already. In it, you want to enable page, database and object caching. Before I use to also enable minify but a few days ago I changed my mind after reading this blog post on improving your site’s speed. The minify optimization will instead be done as part of step 2 now which has actually helped my website load faster. The only tab you want to change the options for are the browser cache, make sure to check the first 3 boxes which are not by default currently. Also in the page cache, you might want to double check that the option don’t cache pages for logged-in users is check’d. Since you are a logged in admin, you want your website to always reload.
watermarked-W3_total_cache_settings

2) Install Cloudflare, use the free version to start with, I still have not had a need for the pro version but considering it if it provides additional speed ups… If you use hostgator you probably noticed it in your cpanel menu.cloudflare I have been using it for a few months now to help against hackers and help speed up my website. The setup is quite simple. You add your website to the service and then go to namecheap (or if you have some other domain registrar…) and use the name servers cloudflare will give you. Cloudflare basicallymakes it so visitors go to cloudflare which shows a static image of your website. It also helps protect you against hackers because it can detect them from a known list or if they do not behave like normal visitors and give them a captcha to solve to make sure they are human. new nameservers for clouflareThey have a 4 step process but I always just do next next next until I get the name servers and never got a problem (the first time I took my time and looked at it but they do a really good job with it so I trust them now). After the nameservers are updated, click on “settings” and go to cloudflare settings and put a green checkbox and rocket loader as “automatic” as shown in the image below. This basically replaces the W3 total cache.Cloudflare settings

3) Get the plugin wp smush.it to reduce the image size of the pictures on your website. Every time you add a new image it will compact it automatically.

4) Finally, one that should be obvious, the plugins you do not need anymore make sure to disable/remove them. Some of them might have an impact on your site’s speed especially if they have to load java script or other such things.

Final step before testing your new site’s speed

Make sure to purge the page cache in W3 total cache (you will probably see it warning you of this at the top) and do a cache purge on cloudflare too before testing for website speed’s at http://loads.in/ and http://gtmetrix.com

This is what I do on all of my website’s nowadays and I really appreciated the additional configuration tips I got from the previously linked impact blog post about cloudflare. If you want to check out the post he has a few other things that he explains but I don’t bother with them since I doubt it would make a difference for my adsense site. Though I did remove the default gravatar image for people without any email images (add one dammit!). I figured this might really help loading speeds on the pages with 100+ comments from the guide.