Blog.

Article topics

Top 10 tips to speed up a badly-behaving WordPress website

Mark Tomkins - Creative Director at Aubergine
Share this:

WordPress – the world’s most popular and widely-used website platform. It brings with it so many benefits for businesses and website owners large and small.

The design can be fully customised to suit your business and there’s a myriad of plugins offering excellent and useful functions available which is all wrapped in a mobile-friendly environment. It’s updated by the WP community and, with the exception of the initial design and development cost (here’s a caveat see point 4 from the list below), is completely free. What’s not to like?

However, ‘out-of-the-box’  WordPress can get slow as you add more and more plugins and features and before you know it you’ve got yourself a badly-behaving website that is too slow for visitors. Fundamentally, Google will hate it for the simple reason that if it can’t crawl the site quickly and has a high bounce-rate or the content is slow to load, it’ll simply move on.

Google likes speedy sites because people like speedy sites – it’s that simple.

A recent study by Microsoft Bing search team (no, not Google – the other ones) showed that a website with a 2 second longer delay in loading reduced the overall visitor satisfaction and likelihood of converting to a sale or enquiry by almost 4.5% compared to a site that loaded 2 seconds quicker. Across the course of a year that’s an awful lot of lost potential business.

In this article, I’ll cover our top 10 tips for speeding up your WordPress website. Whether you get 10 visitors a week or are running a WordPress eCommerce/WooCommerce site that gets 10,000 visitors a week, these tips will all help towards a better experience for your visitors.

1. Good website hosting

– We’ve talked about the importance of hosting before (read our previous article ‘Why a good web host is important for your website’). To simplify all the points in that previous article, it’s your shop front. Making sure it’s secure and inviting for your visitors is vital. Cheap web hosting means it’ll be slow because the web server’s resources will be shared with hundreds, if not thousands, of other websites and your online reputation will be associated with those sites. If those sites get hacked or are sending out spam, that’ll have a direct effect on your website because you’ll be sharing the same IP address. Good web hosting is vital.

2. Yoast SEO plugin

– Sounds odd having an SEO plugin in this list but ostensibly it’s all about user experience. If a user can see in the search results page on Google what you do and what your website is about, they are more likely to get there. If the meta data isn’t managed the search results ‘may’ deliver you there but the users will be confused at whether to visit you or not – and if they visit, the likelihood is that the website’s signposting won’t be clear either.

You can download it here.

3. iThemes Security plugin

– This is a contentious view. It’s quite a chunky plugin BUT the reason for having a security plugin that helps prevent brute force attacks and your WordPress website getting hacked is that in most cases WordPress website owners don’t even know their site has been hacked and is being used to distribute malware or the data is being compromised. Making sure the ‘shopfront’ is secure will ensure that nobody else is controlling your site’s resources and using them for nefarious activity.

You can download it here.

4. Do not buy off-the-shelf themes

– Oops, another contentious view. However, our 10+ years of working with WordPress has given us evidence that in 9/10 cases of WordPress websites getting hacked it’s because the site was built on a bought theme and the original developers of that $20 theme are no longer about and therefore issuing updates for it – leaving it open to vulnerabilities. The large WordPress hack threat of 2015 showed this with the RevSlider plugin being used in thousands of themes and with each of those themes being sold hundreds of thousands of times meant that anyone with that slider installed as part of the theme was vulnerable to being hacked.

Aside from the fact that your website will look like thousands of other, only with the logo changed!

5. Use a good caching plugin

– A really simple thing to do that will have one of the biggest impacts on your site speed. Essentially, the plugin turns a lot of pages with commonly-requested content into flat HTML pages so that the database is queries less and delivers the content from a page cache much quicker. Quicker is better. We use W3 Total Cache and that, used in combination with a Cloudflare set up, will speed up the site and hugely improve your visitors experience and so will make Mr Google happy, too.

You can download it here.

6. Optimising the images

– An obvious one, I know. However, when we run speed tests on WordPress websites using Pingdom (see below) in most instances the site’s resources are being hogged by gigantic images that have been either directly uploaded from a digital camera or uploaded from the large file bought from an image library.  Whilst WordPress does do image optimising (reduce it in file size) there is only so much it can do. We recommend that you make sure any image you upload to your website is no more than 3Mb. Afterall, WordPress will keep a copy of the original and make smaller versions. That means your host space will be filling up. Fundamentally, you should be also using this time to be making sure the image is correctly named.

All too often do we see images on website with the ALT tag and title (which Google can see) as being ‘DSC_001.jpg’ – which is the default file name for photos taken from a digital camera or we see filenames like ‘istockimage12345678.jpg’. How on earth is Google going to know what that image is? Rename it when you’re reducing the image in file size before you upload it.

7. Spend lots of time optimising the homepage

– This may take some time or you may need the help of your friendly local web developer to assist with this. Ultimately, it’s about reducing the number of posts/queries/images loading on the homepage. Yes, you want to appeal to everyone who lands on your website right away but it’s a short-sighted approach. Better experience – think about better messaging and funnelling users into the site – don’t blow it all out on the homepage as it’ll just take too long to load the page, too. One extra tip – don’t use sharing widgets on a homepage. In the history of forever, nobody shares content from the homepage on their social channels. We actually question whether people use them anyway but that’s a topic for another day.

8. Remove inactive plugins

– Obvious. If it’s not being used remove it as it’ll take up resources on the web server, WordPress and is a security risk.

9. Disable hotlinking, turn off pingbacks & trackbacks

– Disabling hotlinking will help by the reducing of bandwidth theft from hundreds of sites leeching your bandwidth that link to images on your site. You don’t need hundreds or thousands of pointless and unwanted calls on your server site just because you’ve got an image on there that’s been linked to somewhere without your permission. It’s something that needs to be done at code level as you’ll need to insert some code into the .htaccess file to do this but will help – especially if you are on a hosting package that’s charged by bandwidth usage.

Here’s the code to add to the .htaccess file. Feel free to copy and use it to speed up your site.

#disable hotlinking of images with forbidden or custom image option. 

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomainname.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
#If your blog content appears on Feedburner or similar you'll need to add that URL too or the images
won't appear on that correctly#
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feeds2.feedburner.com/yourfeednamegoeshere [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Turning off pingbacks and trackbacks on a post is an easy one to do and can be handled simply by selecting the ‘quick edit’ link in the post listing view of wp-admin. Common misconception is that this will stop your post being seen or people linking to it. Trackback and pingback is not related to this at all and fairly irrelevant to most website owners. It is simply a way for a website to confirm that a blog post has been linked to by another blog post elsewhere.

10. Add a lazy loader

– If you do have an image-heavy website or a page design that is long and lots of content there’s really no need to load all the content all at once. By installing a ‘lazy loader’ that uses javascript or Ajax the plugin will load content on the page as that part of the page is displayed and as the page scrolls down then calls to the server to delivery what’s next. It means that there’s less loading on the WordPress database, bandwidth and server processing power and delivers page quicker. Quicker pages = happier visitors.

This is especially useful and practical when it comes to the mobile environment.

You can download a popular one here from WordPress.org’s plugin centre.

 

Check your site speed

The place we go to test all our sites for speed is Pingdom. They offer an excellent tool to check the site loading speed from multiple places around the world and will give you a report that tells you what it thinks is the cause of your slowness. In a lot of cases it’ll be image sizes and number of images on the page. But it may be a dodgy bit of code or a javascript library that’s being called from a location that’s missing.

In an ideal world you need to be heading towards a homepage loading speed of <2 secs. Anything above 4.5 secs needs help.

Check your website’s speed here at Pingdom.