Even people like me who are old enough to remember the great sound of a dial-up modem (when I listen to that I still feel excited!) know that there is a need for speed on the internet.
The above video on speeding up WordPress is part of a course I’m doing on Udemy about blogging, optimization, WordPress, social media and relationships. Please check out my other course on Udemy: Creating a Business Website with a Responsive Design.
With wonderful high speed broadband we now get impatient if a page takes time to load, and sites that leave us starring at a blank screen for more than a second will have the back button hit on them faster than you can say “snail”.
Google has made page loading times an increasingly important ranking factor recently.
So, if you have a slow site no one’s going to hang around to consume your content and no one’s going to find you on Google either. Put simply, page loading times are of paramount importance.
The need for speed is something we’ll always be thinking about as website owners. But I thought I’d write about a few of the biggest wins I’ve had over the years in the endless struggle against slowness. Watch the video above which gives you a practical demonstration of the advice below, and then … tell me what you think!
Check your site with Google PageSpeed
Google PageSpeed is a suite of tools that can help you optimise the performance of your website. I use the Chrome extension (extensions for other browsers are also available).
Select a page of your website, open Developer Tools (Cmd-Opt-I; Ctrl-Shift-I), and click ANALYZE and the PageSpeed tool will give you a score out of 100 and make suggestions about how to improve loading times.
If you’re not sure how to implement any of the suggestions – particularly the maximum and medium priority ones – then contact your host and see if they can help you.
However, the score may well improve after you implement the following…
Load a caching and/or minify plugin
One of the best things you can do to speed up a WordPress site is to load a caching plugin.
These caching plugins store a special cached version of your site and present it to visitors immediately without performing a number of database queries as is normally the way a website would be served.
These plugins need to be configured correctly and, again, you should consult your host on the best plugin to use as well as the correct configuration. Two of the best caching plugins for WordPress are W3 Total Cache and WP Super Cache.
Another important point to remember with caching plugins is that the special cached version of the site may not be the most up-to-date and, especially when you make small development tweaks, it may be necessary to delete the cache to ensure the development tweak is affected.
I’ve also seen great results from WP Minify. Please see the video for more information on these.
Cut down on the amount of plugins you have
Make sure you don’t have loads of plugins activated. 15 should be the absolute maximum.
- Deactivate unnecessary plugins
- Delete deactivated plugins
- Check on the WordPress Plugin Directory. Are you using plugins that haven’t been updated recently or have a poor rating.
A great way to check to see if you have any “problem plugins” loaded is with the P3 (Plugin Performance Profiler) plugin. It’s another plugin, I’m afraid! But all you have to do is activate it, run a scan and it’ll quickly show you which plugins are slowing down your site the most. (After that you can deactivate it and delete it, if you wish.)
Also, you can change the order that your plugins are loaded and/or selectively disable plugins by any post type or URL with the Plugin Organizer plugin. A plugin to organize plugins – love it!
Use a Content Delivery Network (CDN)
A Content Delivery Network (CDN) stores your site’s files in various locations around the world and it will serve your content via your host from the nearest server to your visitor. So visitors from Europe will receive content from Europe; visitors from Asia will receive content from there, etc.
I would recommend MaxCDN. CDNs need to be configured in tandem with your caching plugin. MaxCDN (affiliate link) will give you adequate directions on how to do this with W3 Total Cache and SuperCache.
Use a good host
Sometimes you can make all the tweaks you like to your WordPress installation but, if your host stinks, these tweaks won’t do you any good.
Obviously dedicated hosts will be generally faster than VPSs, which should be faster than shared hosts. However, this is not always the case. You can be pleasantly surprised with a good shared host although that may be down to luck as you’ve been put on a relatively empty server. If you’re serious about blogging then go for a VPS or dedicated.
Optimize your database
As part of general WordPress good housekeeping, you should optimize your database every month or so, especially if your site has been going for a few years and has loads of posts and comments.
You can use plugins like WP-DB Manager to delete unneeded post revisions, unapproved and spam comments, etc., and repair your database with one click.
Use a good theme
There may be some badly written themes out there. You are much better off using one of the well-reviewed premium themes out there. I always recommend Genesis because it’s superbly coded and well-optimized.
But there are loads of other good themes out there. And you can’t go wrong with any of the default WordPress themes, like the amazing and responsive Twenty Twelve.
Optimize your images
The images on your site are likely to be the files with the biggest sizes of all. So it makes sense to optimize them as much as possible. Photos like the ones above should be saved as well-optimized JPGs. Use PNG-8 and GIF for flat color web graphics. And only use PNG-24 when you absolutely have to – when something has to be particularly well cut-out, usually.
When optimizing JPGs, I usually put the quality at around 40-55% depending on the image.
And, always make the image size the same as the size it’s displayed on the page. Never cram a larger image into a smaller size on the page – that’s just wasteful!
Use image sprites
An image sprite is a collection of images put together on a single image. What’s the point of creating a single image sprite? A web page may have many small images, for example social media icons. All those images generate multiple server requests and all have to be downloaded individually whereas an image sprite is only requested and downloaded once thus speeding up the page load time.
On my site, look at the top left hand corner, you’ll see a row of images which are icons of the various social media sites (Twitter, Facebook, etc.) If you hover over any of them they go from black and white to color. Neat, eh? To create this, please see my post on creating social media profile buttons – HTML and CSS.
Above is the image sprite used for the profile buttons.
And above is another one I’ve made for another site. If you want to use any of these, get in touch. I have the HTML and CSS.
Keep an eye on your HTML
If the page is littered with HTML errors then it might be time to pick a new theme. See if you can see where the errors are coming from – it may be you are using a poorly coded plugin and there maybe a better one you could choose.
A few HTML errors may not slow you down but bad HTML, in the very worst of cases, could cause your site to stick or hang on some browsers.
Use post excerpts on your archive pages
This is a blogging, SEO, usability and speed related piece of advice!
An archive page is either your blog’s traditional home page with the last 10 posts displayed, or a category page, an author page, even a search results page. A page which lists multiple posts.
It is best to have this page display only extracts of the posts rather than the full post with all the images, movies or anything else it may contain.
This seems like pretty basic advice for any savvy blogger but I’m constantly surprised by the amount of times I see full posts on archive pages.
Every theme handles this differently. For some themes you may have to edit the theme’s PHP files to show excerpts on the archive pages. On the Genesis theme framework, under Theme Settings > Content Archives, I choose “Display post excerpts”.
You can do it
No matter if your site is one month, one year or one decade old, you’ll always be trying to get your page loading times down.
I hope you will find one or more of the above suggestions helpful. If you have any other suggestions please leave them in the comments. Let’s talk!
Google has a speed tracking service tacked onto Google Analytics you can set it up here for your site. This enables you to see how long it take for different pages to load for different users. You can segment by browser type, country and all the other usual categories you get with Analytics. More about Google Analytics site loading tracking here by Matt Fox.
There are some links that are affiliate links in this article. If purchases are made through some of these links, I will receive a commission although the price to the purchaser will be the same. If you’re not happy with this feel free to purchase the product via a Google search. 🙂