I remember the first time I heard about website’s speed. I was a newbie Website developer back then.
All I thought people cared was a beautiful website. But when I read further, it became clear that I myself never waited to load a beautiful website.Β You never know that a website is beautiful until it loads up.
So, why would some random dude, who has just seen your website on random google search results, care if your website is beautiful, when he could not load it?Β What was more frustrating was, in HTML you have to optimize every page.
To be true, the day I found out WordPress, I was blessed. It is simple, to the point, no fluff and easy way for us web developers to create art.Β What is more interesting is you just do it backend and it takes care of itself from front end.
Before WordPress, my website used to be much slower. And after using WordPress, it became quite speedy.Β But, if you are like me, you have likely heard about the tools like Google Pagespeed and GTMetrix etc.
When I used to put my WordPress website in those tools, all I would get was 69 Google Pagespeed and 73 YSlow grade. So, I knew I needed to learn a lot.Β I experimented full 3 months, with all the themes, plugins and what not.
At the end, I found some gold nuggets. These are the real life experiences I am going to share with you today.
Why Site Speed Is Important?
I will not beat around the bush, as to why speedy website is important. Other web developers have written bibles about it, joking!Β First of all, it boils down to user experience. Your users will be much happy when your website loads up fast.
Secondly, it is one of those few official Google ranking factors that Google has actually confirmed.Β I think it is enough motivation for you to get your site speeded up.
How to actually Speed up WordPress Website?
βOkay, I know I have to speed up my WordPress website, but how?β
This was exactly what I thought when I started this experiment. There are few factors that I would like to discuss here. But firstβ¦
Tool to use in your experiment?
Personally, I use GTMetrix alone. It gives me more than enough details that’s why I am its happy user.
It gives you page load time, which element took what time, page load size, Google Pagespeed and YSlow Grades, option to load a website from different locations etc.Β If you sign up, they even have WordPress plugins which is awesome.
Use Fast Hosting Servers
I did not experiment with this, I was a newbie and was on a budget. So if you have any host, donβt worry, there are more than enough other methods to speed up your site.
Not everybody can hire expensive servers, when they are starting up. Thatβs fine!
But, if you can afford, use fast hosting services. There are many people who have reviewed different hosts after testing them. Do a quick google search.
Use a Caching Plugin
With more than 20 caching plugins to choose from, it took me many days to find out which is working the best. Can you guess which one is?
W3 Total Cache!Β It defeated every other plugin every time. Even with mediocre themes, it works like rocket.
Butβ¦
Minify HTML, CSS & JavaScript
I donβt use minify options of W3 Total Cache. They have been breaking my site many times.Β Sometimes in an update and sometimes without any valid points. I used to get frustrated about it.Β Such a great plugin, but poor minification. It may be working for some websites, but mine was never getting minified.
Actually, what would happen is this:
The CSS will not get loaded and so is JavaScript. What do I do now?
I started experimenting with minification plugins. There is a lot to choose from. But what everyone used to mention back then was Autoptimize and Better WordPress Minify.
I tested them both and Autoptimize is a clear winner. Install this single plugin and it will alone increase your GTMetrix score.Β The man behind this plugin, Frank, is also awesome guy. I have many times asked him for some random help and he has helped me happily.
Use a CDN
This one is necessary. CDNβs work like this:
If you are loading a website from US, the files will be loaded from US server. If you are in Canada, the files will be loaded from Canadian server. In this way, CDNs save a lot of time.
I have found Cloudflare to be working best for me. They also offer a free lifetime plan. I start my new websites with this plan.Β It is an easy set up. You will improve your website load time and YSlow grade with this CDN.
Optimize your Website Database
This was a huge problem for me when I was a newbie. All those spam comments, auto-drafts, revisions, comment-meta-data used to pile up my website database.
At one point, my websiteβs server went down, so I had to switch. Thatβs when I realized even the database is so much large, when all it has to do is store text.
When I got this problem, I searched for a solution. WP Optimize worked the best for me. It cleans up everything I described above. You could set it on autopilot.Β It has never once broken down my site. The developer keeps this plugin updated. What else could you ask for free?
Optimize your Images and Lazy Load them
I once asked my friend: βIs there any way I could reduce the size of my images while keeping the same quality?β
He laughed on me. Well, at that time I did not know if there was a software OR plugin for this task.
But, now I know there is software as well as plugin. I use a software called JPEG Mini and when I did not have the software I used EWWW Image Optimizer. They both work very well.
Another thing you can do is lazy load the images. Again there are tonnes of Lazy load plugins. I wonβt bombard you with another βTop 20 Lazy Load plugins to useβ. I have tried most of them.
What worked great for me is BJ Lazy Load. It is simple and effective. Just install it and click activate!
Use These WordPress Themes
I will tell you a secret here. Do you know why people use paid themes when they can get a similar theme for free?
Donβt know? I will tell you. Most of the free themes are created by newbies OR someone getting started in their WordPress journey. It is likely that they donβt have experience.Β It means they might write 10 lines of code that could have been done with another 1 line code. You get the idea!
I know when you are starting out, you want to keep your expenses low. So, I will suggest you to use Freemium themes.
Ever heard the word freemium?
It is a free theme released by a premium WordPress theme company. They update it regularly and you get to use the theme for free.Β They are free themes created by professionals. Code quality, speed, performance, options, widgets and much more functions are included in them.
I use aThemes and MyThemeShop themes. They both are premium WordPress theme companies, yet they have some themes you can use for free.Β PS: I love Solon theme by aThemes. Perfect choice for me!
Enable Keep-Alive
Keep-alive works like this:
Client machine (web browser) asks permission from Web Server to download a file. It asks permission every time it needs to download a file.Β When you have Keep-alive enabled, it asks for permission once. Once the connection is live, there is no need to ask every time. This saves website load time and bandwidth.
WARNING: Before you make any changes to your .htaccess file, please make sure to back up it.
To enable keep-alive you have to add this code to your .htaccess file:
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
Conclusion
To summarize everything, right now at least install these plugins and speed up your website instantly:
- W3 Total Cache
- Autoptimize
- WP Optimize
- BJ lazy Load
Just note down your GTMetrix score before you install these plugins and check back after you have configured them.
Here is the GTMetrix score of one of my websites. There is one last point I want to make.
I have tried to make the score 100%. But it never happened. I just wasted all my time.
So, I want to advise you that, once you have gone beyond 90% score in Pagespeed and YSlow, just stop. Donβt waste your time making everything perfect.
If you have some creative ideas to speed up WordPress website, do share it with us.
Keep speeding up!
7 Responses
I have used this article to speedup one of my website which was performing pathetic before scoring just above 50% in gtmetrix page speed result. thanks for sharing this. It scores 90% now
Wow! This tutorial helped me to Speed Up WordPress Site. I had not much idea about CDN and image compression. But I using CF and image compression tool as well. Now my site loads under 1.5 seconds. Thank you very much for this article.
Thanks, Jyoti
Great tips! Alternatively, you can use StackPress, a managed WordPress Hosting provider. They handle caching, file compression and minification at the server level. So you WordPress website is very fast out of the box.
Thanks ! Great tips over there.
Thanks β¦Β those tips have worked for me! gained >2seconds on the home page loading time!
Very useful tips and a nifty word! Great post, Pankaj, many thanks!
Hi Ann, Thanks for reading it. Let me know if you need some help in speeding up your website π