WP Curve WPPS

WordPress speed – How to reduce your load time to under 1 second

One of the most common queries we get at WP Curve is ‘can you make my site faster?’. Website speed is important for a variety of reasons. Here are 4 key reasons:

The final reason was the most important to us because we’re a WordPress support provider. In this post, I’ll run through some very specific actions you can take to speed up your website. We’ll use our site as the benchmark and demonstrate how we reduced our page load time to under 1 second. We’ll also address the common reasons for slow websites, so you can work out which ones you need to deal with in order to improve your own page speed. Find out how to reduce your WordPress load time to under 1 second – CLICK TO TWEET Before and after results Here are some before and after results from our site.

Our original site was put up quickly and like many websites, we added things over time that weighed it down. When we decided to invest properly in the site, it was clear it had to be completely re-developed. The result above, 5.2 seconds is just outside the acceptable range for a typical small business. But we wanted to demonstrate best practice and get the download time to under 1 second. Note the result above was when we were hosted on our own Virtual Private Server (VPS), running W3 Total Cache and running a Content Delivery Network (CDN) tool CloudFlare. It was as bad as 10 seconds without any caching. Here’s how it’s looking now:

Note the Pingdom speed test tool can be a bit inconsistent, but I’ve had consistent times of under 1 second which was our goal. Ok let’s get stuck in to the major ways you can speed up your site.

Hosting

The quickest and easiest win you can have with page speed, is upgrading from a cheap shared hosting provider to a managed WordPress host. Cheap hosts are good for when you are starting out, but for ultimate performance you can’t match a managed WordPress host. Even our clients who have signed up with a dedicated server or a VPS (Virtual Private Server) struggle to match the performance of a managed host.

As you can see from our results above, just having your own server doesn’t mean your site will run quickly. We host on WP Engine and noticed an immediate 54% speed improvement the day we moved. They have a smart way of managing WordPress sites. They limit certain plugins, have different ways of managing caching and re-directs and have a built in CDN that serves images and other files at lightning speed. Prior to WP Engine, we were hosted on our own VPS and we had a CDN as well as a caching plugin installed. So a 54% speed improvement was pretty remarkable.

If you want to know if your host is an issue, here are 2 easy tools you can use. Google PageSpeed Insights A really quick and dirty test is to enter your domain into Google PageSpeed Insights. If one of the issues raised is ‘Server response time’, then you can get a big win from hosting with a fast host.

I’ve seen these as high as 5+ seconds which is obviously a big problem if you want to get your entire site to load in a few seconds. This is just the time it takes to hear a response from the server, let alone load the whole site. Pingdom Speed Test Tool The Pingdom Speed Test Tool will give you some quick information about the speed of your site. This doesn’t just relate to server speed, it will give you a lot of useful and actionable information. Here’s a rough, subjective guide of what is acceptable:

These times can be influenced by a lot of things, but as a guide if you are under the 2 second mark, you probably won’t experience a huge win by changing hosting.

Plugins

It’s not just speed. Your choice in plugins will be a common reason behind a lot of WordPress problems. Because plugins are written by different developers with varying skills, you need to be careful what you install and how many you install. As a general guide, we like to keep sites to under 20 plugins. A better rule of thumb is ‘less is best’. If you can have 0 then that’s fantastic, but probably unrealistic. We have 2 recommendations here: Remove any plugins you don’t need Remove any inactive or active plugins that you don’t need. Here are the plugins we removed and the reasons for removal:

This left us with 16 plugins on the site. Note I’m not saying these plugins are bad. This is just typical of a small business website. If you aren’t checking regularly you end up with a bunch of plugins that you can live without. Removing plugins generally means doing one or more of the following:

Avoid problematic plugins There are certain plugins that we’ve found can really slow down sites. I won’t mention specific plugins here because we are often going back and forth with plugin developers to get them to resolve issues. However there are a few common culprits.

Plugins can have a huge impact on your site speed so be careful about what you install.

Site size

A common reason for sites being slow is because of the size (in kilobytes) of all of the elements that make up the site, namely scripts and images. The Pingdom Speed test tool can tell you how big your site is. Our site was only 1.4 MB, which is OK. We’ve seen plenty of sites that are 4mb plus and that will have a massive impact on your download speed. Here are some rough, subjective guidelines around the size of the site:

The culprit for a large site is often large images. Here are 2 ways to find if you have images that need to be optimized: The quick and dirty way is to use the Pingdom site speed test tool and after you run the test, click the drop down and choose ‘Sort by file size’. If you have images in here that are over 100kb then you can take action on those images.

A better way is to use GT Metrix. Visit GT Metrix, enter your domain name and run the search. This will give you a bunch of important facts and specifically lists all of the images that need to be optimized. It even optimizes them for you which is a neat feature. You’ll have to download them and replace the ones on your site.

Here are a few other tips for optimizing images inside WordPress:

Reducing external scripts

A really common cause for slow WordPress sites, is the existence of too many external scripts. Having Facebook like buttons, your Klout score and offsite videos are examples that can have a big impact on the load time. Once you load from other sites, it limits your options in terms of how you can treat that script. Simply removing some of these features can have a big impact on your site speed. On our blog, we ran with a minimalist design that focuses on the content. We removed Facebook and Twitter share totals from the blog homepage. We don’t use any externally hosted Infusionsoft forms. We compromised by keeping Disqus and SwiftType, because they are exceptional plugins. For others, we decided we could live without the feature in favor of having the blog load quickly. Simply deciding that you can live without certain features is sometimes all it takes to get a significant boost in speed. Here is a list of some common external scripts:

Not to say you should always turn these off, it’s all a compromise you may really want some of these features but you can compromise on others. To work out which scripts are particularly big, you can use the same approach above with the Pingdom Site Speed Tool and filter by size. GT Metrix will also tell you how many external JavaScript files your site is loading. From there you might decide you can live without some of them, combine them or make them load later (more on this later).

Too much ‘baggage’

One thing that could be slowing down your site is the sheer amount of ‘stuff’ that has accumulated on your site over the years. We found a big improvement just from re-doing the theme on our site from scratch. Even though we’d only built the old site 8 months ago, we’d added to it quite a bit and it had filled up with code that wasn’t necessary. Coding a new theme from scratch meant a lot less code. This is not the only type of ‘baggage’ that can slow down a WordPress site. Here are a few other manifestations:

There’s no real quick fix to the baggage issue other than to regularly keep an eye on your site and clean it out. If you’re not sure how to do it yourself, it’s probably best to find a developer to do it for you. A few improvements could be:

Think of it as servicing your car. You can’t leave your website in the same state year after year and expect it to perform the same way.

Speed up high traffic pages

I’ve read a few posts about how to speed up your site and very few mention this simple tip. It’s likely that 80% of your traffic is hitting only 20% of your pages. For maximum impact, it makes sense to optimize the most popular pages. We pay particular attention to our homepage. That’s not only a high traffic page but it’s the one that has the biggest impact on our brand. First visit Google Analytics, then click Behaviour / Site Content / All Pages. I’m willing to bet your homepage is top of the list. You can apply the same approach to any other high traffic pages.

Making your home page and other high traffic pages faster will improve the speed for 80% of your visitors.

Some more advanced techniques

The techniques mentioned above should be enough to get your site load time into the good range (under 2 seconds). If you are really keen, there are some more advanced things you can do:


function ewp_remove_script_version( $src ){
	return remove_query_arg( 'ver', $src );
}
add_filter( 'script_loader_src', 'ewp_remove_script_version', 15, 1 );
add_filter( 'style_loader_src', 'ewp_remove_script_version', 15, 1 );
Thanks to Doug from Efficient WP for supplying that code. He has some more tips here on WordPress speed. Some things are more important than speed Just as a final thought, it’s worth keeping in mind that speeding up your site involves compromise. We could probably get our site loading much quicker if we wanted. But there are always competing priorities like:

I think if you can get your site under 2 seconds then it becomes about prioritization. If it’s important that you have a nice design, you probably do need some decent size images on there. If there are some plugins you can’t live without, it makes sense to keep them and take a bit of a hit speed wise. Summarizing WordPress speed You can really go deep on speeding up your WordPress site. You could probably spend weeks fine tuning all of the elements and getting it perfect. But for most people, there are a few major reasons why their site is running slow. And if you don’t deal with these issues, the fine tuning is a waste of time.

Improving conversions and user experience will also help your rankings in Google. To help you implement the modifications required, we have created a free downloadable WordPress speed guide. Download it for free below.

If you have any questions about WordPress speed, please reply in the comments below. If you are interested in support with your WordPress site check out WP Curve.

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41971521-1', 'wpcurve.com'); ga('send', 'pageview');