Website speed matters more than you think. Here are some ways to improve the loading speed of your WordPress website that are sure to impress Google and your visitors.
Here are 3 good reasons to make your site as fast as possible:
- Everyone loves a fast website. People, in general, are impatient. If your website is taking more than a few seconds to load, potential visitors will just hit the back button and choose a different website to visit.
- Google knows this as well, which is why page loading speed is a search ranking signal for Google. Faster loading speeds will help you rank higher, while poor speeds can drop you right down the rankings.
- Mobile devices are hugely popular, but mobile networks aren’t always fast. Faster loading websites will help improve the experience for people browsing on their phones.
WordPress is both an easy and powerful platform for building a website, but the more features you add, the slower it can become. No matter how fast your website is loading at the moment, hopefully you’ll be able to implement at least one of these tips to improve your website loading speed.
”Amazon calculated that a page load slowdown of just one second could cost it $1.6 billion in sales each year.Source: FastCompany.com
How To Test Your Website’s Speed
Before you begin tweaking and making improvements, check the current performance of your website. There are two main tools I would recommend for this.
- Google’s PageSpeed Insights – This tool gives you a score out of 100 for both mobile and desktop views of your site, as well as a list of suggestions for improvements to make and an estimate of how much they will improve your speed. Another big benefit of this test is that it’s run by Google, so should give a good idea what they think your speed is like, which is always nice to know if you’re trying to rank well with your SEO.
- WebPageTest – What I like about WebPageTest is that you can choose which location to test your website from. Google’s test is from the US, whereas I can set WebPageTest to run from Sydney (or anywhere else) which gives a better idea of speed that customers in your target area will be experiencing. It also gives a nice waterfall view of how everything loads on your site and what might be holding everything else up.
Now that you’ve got a baseline result, you can start your investigation and tweaking things.
First things first, how’s your web hosting? Some shared hosts cram a lot of websites on to the same server, which can really impact performance. Using the two tests above, have a look at your server’s response time, or “Time to First Byte”. This gives you an indication how long it takes for the visitor’s browser to send a request, get information back from the server, and start loading the page. Here are some examples from WebPageTest for two different websites, on two different hosts.
As you can see, the first site only took 0.195 seconds to start loading the first byte of data, but the second site took 2.261 seconds to begin. The first site took 4.4 seconds before the user can interact with it, while the second website took almost 10 whole seconds. While it doesn’t sound much, try clicking on a result from Google and then counting to 10 seconds. Most people give up, click “back” and choose a different result if they have to wait that long.
You should use a web hosting company with servers located near your target market. If you’re based in Australia, use Australian servers. If your main customers are on the East Coast of the US, then that’s where you should be hosting your website. I use VentraIP to host my website as they are affordable, use fast solid state storage (SSDs), have built-in LiteSpeed cache for WordPress sites, free Comodo SSL certificates, 24/7 phone support and support Cloudflare + Railgun CDN (which I’ll talk about shortly). If you’re looking for an affordable, quality web hosting solution, I’d definitely suggest checking them out (and no, I don’t get any kickbacks for saying that!)
”Google has calculated that by slowing its search results by just four tenths of a second they could lose 8 million searches per day!Source: FastCompany.com
Use a Content Delivery Network (CDN)
If your website is hosted close to your visitors, they should get reasonable performance. The problem is, your visitors may be coming from all over the country, or all over the globe. So how do you provide quick connections and loading speed for everyone, no matter where they are? Use a CDN!
In basic terms, a CDN keeps a copy of your website (or at least, some of the content from your website, like images) on their servers all around the world. If someone is trying to view your website from the US, your content will be loaded from the US. If they’re trying to view from Australia, the content will be loaded from the CDN’s Australian servers. It checks where the closest copy of your content is and then serves it to the user from there, cutting down the amount of time it takes to send the data.
One of the most popular CDNs out there is Cloudflare. I use it and love it because it does a great job, and because it’s FREE! Cloudflare has plenty of other add-on products, but the basic CDN costs nothing, which is awesome. They’re in 155 data centres around the world, and serve more web traffic than Twitter, Amazon, Apple, Instagram, Bing, & Wikipedia combined so you can be sure they’ll handle your website’s CDN needs.
Another great product that Cloudflare has is called Railgun. While a CDN will serve about 2/3 of your data from a data centre local to the website visitor, some content (especially dynamically produced content) still has to be sent from your original server. Railgun optimises the connection between your origin server and the Cloudflare CDN, resulting in speeds around 200% faster than without Railgun. The downside is Railgun has to be installed/supported by your web hosting company. VentraIP (the host I use) has Railgun installed, and it’s all included in your hosting plan.
One Cloudflare product which I don’t use, as it’s a paid service and I don’t really have a need to use it for a personal blog, is Argo Smart Routing. Because most internet traffic is routed through static routes, if there are network issues somewhere along the route, you can end up with poor performance. Argo Smart Routing uses real-time network data to choose which route to send traffic down to achieve the fastest, most reliable path from the origin to a Cloudflare data center. If I was running a business site or a busy site I would definitely invest in this.
Optimise Your Images
Images are often the largest files on a webpage and can cause huge loading delays if they’re not optimised correctly. Firstly, resize the images to the size they’re actually going to be displayed on your site. There’s no point having an 8 megapixel photo if you’re just serving it up at 1,024 pixels on your website. Once the file has been sized correctly, compress it. You can use a web-based tool like TinyPNG or a plugin like Smush to compress and optimise your image file size. This can make a massive difference in file size, resulting in much faster loading for visitors.
By default, WordPress generates a lot of pages on the fly. If your website isn’t full of dynamic content (i.e. if your content isn’t changing every few minutes), you should be caching your pages. There are plenty of great plugins to do this, including W3 Total Cache and WP Super Cache. I happen to use LiteSpeed Cache because my web host also runs LiteSpeed Web Servers.
Other than caching your web pages as static HTML files, these plugins also offer a few other tweaks to help you along your journey to a lightning fast site.
Kill Your Slow Plugins
Plugins can be both the best and worst features in WordPress. There are so many great plugins you can install to add extra functionality to your website. Unfortunately, not all plugins are created equal, and many can cause huge delays on your website. There was a great way to test this, ironically, by using a plugin – P3 Plugin Performance Profiler. Unfortunately it hasn’t been updated for a couple of years and seems to be causing issues for people. However, there are other ways to see which plugins may be slowing down your website.
Check the waterfall view on WebPageTest to see which files are taking a long time to load. You can usually tell from the list on the left which plugin is causing the issues. A more manual way to test, is to turn off all your plugins, then re-enable them one by one and test your website to see what the speed is like after you turn on each one (this is also a good way to test if a plugin is causing any other issues you notice on your site).
Instead of loading all the images, scripts and other items on your page all at once, lazy loading waits until that part of the page is on the user’s screen before loading the required content. This can save huge amounts of time (and server resources), especially on longer pages. There are plugins that are designed specifically for lazy loading, though you can often find an option to enable it in your cache plugin.
So there you have it. If you try some or all of these tips, you’ll be sure to have a much faster loading website, which will keep your visitors happy and keep Google happy. Let me know if you have any other handy hints to increase speed, or ask any questions in the comments section below.