The following post is a guest post from Reginald Chan of ReginaldChan.net.
In the following post you are going to learn exactly how to improve your WordPress websites loading time and see how these steps helped me get the loading time for my site to around 1 second. While it’s true that I am using a WordPress based website, a number of these steps will work with none WordPress websites too.
I must confess, that I am unusually obsessed with reducing the loading time of my blogs. For most conventional bloggers, they wouldn’t really mind about website loading speed too much, because it can get fairly technical.
The truth is, it’s not that mind blowing and I’ll show you how to do it.
Now, here’s the fact … at least for me. Website speed is important because it affects not only your visitor’s user experience but it is also a ranking factor within Google’s algorithm.
Take a moment (just a moment) to think about this. How long will you wait for a page to open before you finally decided to close or change tab?
Would you give it a 5, 10 or a generous 15 seconds for a page to load? Personally, I would give it just 5 seconds to load. Oh c’mon! At least, please load the first paragraph so I could read it!
It doesn’t matter if you want to speed up your website speed to help with SEO, website ranking or user experience. You need to do it one way or another.
Before I show you exactly how to improve your websites loading speed, let’s see the effect it has had on my website, shall we?
Do note that I’m using HostGator at the time of testing and it will vary from one hosting provider to another.
This is what it looks like before optimization:
And this is what it looks like after optimization:
Despite updating my home page with more content and activating several new plugins these steps have yielded a significant improvement.
Are you tempted to start already? So, how could you possibly start ‘optimizing’ your website speed?
How to improve your websites loading time
The importance of website hosting provider
When talking about website speed, your hosting provider plays a huge role. Yes, they are the one who basically ‘determine’ the speed of your website.
Ask yourself this:
Does your website loading take more than 1.5 seconds or more to load?
If you are not sure, go hit up Pingdom Tool and try their website loading speed tool. Test run from either Texas or New York and it should be below 1.5 seconds loading for a normal website.
You see, most hosting services in the States offer unlimited hosting and you can probably get one plan below $10 per month. Sounds good? No!
Overselling happens and if you’re unlucky, you might be on the same server as a few bad neighbours. Well, bad neighbours are going to affect your website loading speed due to misusing, abusing and probably 100 more reasons.
Overselling is a process where hosting companies sells more than what their servers are capable of handling. For example, if the server is able to maintain 30 domains at one time, they could easily be jam packing 50 domains or more. This increases the load of the server and in turn affects the performance.
The thing is, I’m not saying that all web hosting companies do that but a lot of them do. So, pick your hosting company wisely.
Optimizing Images to reduce load time
This is crazy. Do you want to load a full HD image into your post? Ok, you could but it is going to take up a lot of time for loading right? Now, you need to optimize the images so that they load faster. In return, a faster loading website!
Forget about those paid tools as you can optimize images for free. Here are my favorite tools:
I usually practice optimizing images with PunyPNG and finally with JPEGMini. So, I optimize my images twice!
Now that you had done the above step, the next step is to get the images hosted from another site. Why?
It is simply faster to load images from another hosting than from your own database. You know … it takes up time and space. Here are some of the image hosting websites that does a good job for the matter (and for free):
Keeping a storeroom full of plugins?
If you have any unwanted plugins, uninstall them immediately. Don’t keep them in your database as that will not help you in anyway. Worst part, it could even be a very real security threat instead.
I know WordPress is filled with many useful plugins but this doesn’t mean that you should keep them all. Keep the ones that are useful for you and this will ensure that your website is always running at its top speed or at least, putting less stress on the servers.
With 22% of WordPress security issues originated from plugins, this is definitely another great reason why you should uninstall all unwanted plugins from your website.
Using a cache plugin
If caching isn’t your cup of tea, then you could install a WordPress cache plugin like W3 Total Cache (W3TC), WP Super Cache, Quick Cache and Hyper Cache. A cache plugin will help improve the website performance and at the same time, speed up the website loading speed.
Personally, I am using W3TC as it is much easier to configure and most importantly, it fits my website’s requirements perfectly.
If you are interested, I wrote this article to explain about my W3 Total Cache settings for optimum results.
Display too many things at one time
Are you placing too many widgets in the sidebar or on your blog? The more widgets and other elements you place on your webpage, the more time the site will take to load them.
Certainly yes and let’s take Blogging Wizard’s website for an example. Do you see the crisp and clean sidebar it has?
So, start clearing your sidebar, leave more space and most importantly, boost your website loading speed now!
Are you ready to get your hands dirty?
Below are some techniques that would require a little bit serious work but don’t worry. Just follow these guides and you will be just fine. I have tested them personally and they worked well … and I even tested with four different hosting companies.
Avoid using @import
Let’s assume your website is using some custom fonts. You don’t have them in your database and you need to import them from an external source. All these imports will lead to a longer loading time as the website would need to fetch the data every time the site is loaded up.
Changing the code could easily solve this problem and it only takes one string of code to do.
Just replace the original with the code <link rel=”style.css” href=”style.css” type=”text/css”> and you are all set. Below is an example:
<link rel=”style.css” href=”style.css” type=”text/css”>
Once you finish pasting the code, you need to do one more thing … which is changing the “style.css” to the URL link of the original @import location.
Gzip compression helps to speed up your website
So, what is Gzip compression all about? Gzip compression is a technology that minimizes the size of browser-based HTTP responses and as much as 70%. Yes, this means that with proper Gzip compression, the website will load faster and indirectly, reducing your website load time.
Here’s a short video to show you exactly what Gzip compression does (credits to Kevin Khaw and Eric Higgins):
Compared to the rest of the steps in this guide, this could probably be the easiest technique of all. Just copy the code below and paste on your .htaccess in your WordPress database.
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
Click save, clear your cache and you are done.
Over to you
I hope these WordPress tips will help you build a faster website, give your website an indirect boost to it’s ranking and ultimately improve the usability of your website.
Do you know or use any other method(s) to optimize the loading time of your blog/website?
Don’t forget to share them by commenting using the form below.