August 3, 2015 odihost

10 Ways To Speed Up WordPress

Here’s a scary fact: according to the good folks at Kissmetrics, the amount of time that you have to capture the attention of an average visitor to your website is approximately 2 seconds. Anything slower than this, and you could be cutting the amount of people browsing your site in half. Add to this the fact that your page load time can play a part in your Google page ranking thus directly affecting SEO, and you can quickly see that we live in an age where speed matters.
You may be aware that WordPress, while otherwise a fantastic platform, can unfortunately run rather slowly without optimization. If you have a website that hasn’t been optimized, you could be missing out on serious amounts of traffic.
In this article we’re going to look at 10 steps you can take right now to make your WordPress website run lightening quick and thus increase your traffic and your visitor retention. Before we get stuck in, if you don’t have the time or the inclination and just want someone to speed your website up for you, talk to us today about our comprehensive website optimization service.

With that mentioned, let’s get into it:
1. W3 Total Cache
Free and incredibly effective, W3 Total Cache (https://wordpress.org/plugins/w3-total-cache/) is a caching plugin that works to increase server performance and dramatically improve page load times. The plugin is well rated and is even used by some very well-known businesses, including the likes of AT&T and Mashable. Simply install it and watch your page load times instantly improve. There’s also plenty of options for the more technically minded amongst us to really get their hands dirty.

2. Use a content delivery network (CDN)
A CDN is a collection of servers across the world that delivers the static assets of your website (your images, CSS files and JavaScript) to your visitors based on their geographical location. Best used for websites that have global reach, a CDN basically makes use of a local server to provide your content to users in that area in the fastest possible time.

Using a CDN can have some costs attached for premium plans, but if your website serves a global audience, making use of one will turbocharge load times for your overseas users. There are a number of CDN services available, and we suggest doing your research to see which one best meets your requirements.

3. Optimize images automatically
Many images are bloated with avoidable metadata that can cause the file size to be unnecessarily large. And as we know, large file sizes = slower load times.

On top of this, one of the unfortunate aspects of WordPress is that its image resizing tool will allow you unwittingly upload an image that is much larger than it needs to be. While the tool will do its job and display a smaller version of your image so it looks right on your site, the enormous image you uploaded will still be the one that is being used behind the scenes. This means an unnecessary use of bandwidth, and a slower page load time for your visitor.

As luck would have it, a solution exists in the form of free plugin called WP Smush (https://wordpress.org/plugins/wp-smushit/), a tool which automatically strips away redundant data from your images as you upload them to reduce file sizes without losing quality. Same high quality images, faster load speeds – definitely one to install!

4. Add Expires headers
An Expires header tells a user’s browser whether it should request a file from the server hosting your website, or whether it should grab it from the cache of the browser itself, based on how long it has been since the user visited your site. Of course, this won’t make any difference to a first time user as a file cannot be in the browser cache until they have already visited the site, but it is a free and easy way to improve load times for return visitors.
Read more about implementing Expires headers here: https://gtmetrix.com/add-expires-headers.html

5. Use CloudFlare
CloudFlare provide a content delivery network (CDN) in addition to other cloud features to improve site speed, security, and analytics. Their basic package is free (yup, an effective CDN that doesn’t cost a cent!) and is definitely worth looking into. Even if your site doesn’t serve a global audience, the increase in speed and security that CloudFlare provide definitely make it worth signing up.

6. Limit the number of files required to display your website
Every time a visitor comes to your website, all of the files that form your site have to be sent to that person’s web browser. Every image, every piece of CSS or JavaScript; it all has to be sent from the server to the individual’s browser. As you might imagine, the more files that you have, the longer this process takes, and the slower the website load speed will be.

The trick here is to reduce the amount of unnecessary images and code that are used to form your website. This doesn’t mean that you should necessarily compromise your site design, but you should be critically reviewing every additional element you add to your site and asking yourself “do I really need this?” If the answer is no, leave it out – your site will be faster for it.

7. Minify your code
When we write code, we often follow a certain ‘standard’, leaving spaces in between lines and adding in gaps to differentiate between sections. However, servers and web browsers don’t care at all for our additional spaces; as long as the syntax is valid, they can process it without all of that extra stuff. Remember that less redundant information will always help to increase load times, and this includes blank spaces!

Starting to worry that you’re about to be spending some serious time altering your code? Fear not code warrior! Fortunately for you, you will not have to go trawling through all of your code to clear out the extra white spaces as there are plugins available that will handle this minifying of code for you. W3 Total Cache (see point 1) will do it as part of its features, or if you’re looking for a more lightweight plugin, Better WordPress Minify (https://wordpress.org/plugins/bwp-minify/) will do the same job.

8. Reduce the number of plugins
As with the number of files required to display your website, the number of plugins you have will also directly affect the loading time of your website.

One of the temptations you may experience as a user of the WordPress platform is that there are just so many neat sounding plugins to choose from and try. And so many of them are free! Although we’ll be the first to admit to trying out the latest cool sounding plugin to see how we can improve the look of our site, just remember that every plugin you add has the potential to slow your site down. If you don’t really need it, don’t install it, and if you have it installed and are not using it, get rid of it!

9. Choose a simple and clean theme
There are literally thousands of free and premium WordPress themes to choose from. Picking a theme that matches the purpose and design for your website is of obvious importance, but have you ever stopped to consider the speed of your website when making your choice?

The more image dependant and the more cumbersome the theme, the slower your website will load. It’s no good having a home page made of 50 rotating GIF images that looks like the coolest thing this side of 2015 if it takes 20 minutes to load, as no one will stick around to see it.

Before you commit to a theme, use free tools such as Pingdom (http://tools.pingdom.com/fpt/) or Webpage Test (http://www.webpagetest.org/) to check the loading time of theme you have in mind.

10. Specify the image size
When you upload an image to WordPress, you are given the option to set the width and height for that image. Make sure that you do this, as if you don’t, when a user visits the site their browser will not be able to correctly render the rest of the page until the image has been downloaded, and the browser will then have to perform a reflow and repaint. By specifying image width and height, the browser is able to allocate a box on the page so that the rest of the page can be correctly rendered even before images are downloaded, thus improving overall load time.

11. Remove Emoji code
Add the followings script in your theme function.php
remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );

We hope you’ve enjoyed our tips. If at this point you’re feeling a little overwhelmed about how to get your site running as fast as possible, talk to us today and let us turbo charge your website for you with our website optimization service.