Most people don’t tend to look into blog performance until speed issues or outright downtime becomes apparent. Increased search rankings (yielding more traffic), a popular social share or a feature from a popular third party site can all highlight glaring issues with your blogs performance once it becomes inundated with traffic and grinds to a halt.
This is obviously something you want to avoid. No blog should want to waste traffic. No blogger wants to lose their readership because of performance issues and you certainly don’t want to lose those grafted out search rankings because of a slow site load time.
Fortunately, help is at hand and there are numerous ways you can optimise the performance of your blog. You also don’t need to wait for a traffic influx before addressing the points below. A fast loading site should be a priority for all, regardless of traffic levels. So let’s take a look.
Plugins
If you’re running WordPress you can find plugins that pretty much do everything I’m outlining in this document. Although with that said you’d be wise to run through the list anyway so you can see what everything does and how it works. Otherwise the options within the plugins will look a bit alien to you. W3 Total Cache is my plugin of choice for all things blog speed related. As the name suggests it offers caching functionality but also comes with lots of other features such as Minifying and CDN support. There are other plugins out there too so either choose a complete package like W3TC or research your own plugins to handle the tasks I’ll discuss below.
Minify CSS/JS
To minify is to pretty much remove all the unnecessary white space from your CSS and JavaScript files. I’m talking about all those blank lines, tabs, even single spaces after your elements and functions. Each of these blank lines and spaces increase the physical size of the file on your disk and obviously the bigger the file, the longer it takes to download and the longer it takes to download, the slower your site will load.
There are lots of plugins out there and even web based tools where you can paste your CSS and JS code into in order to Minify it. I’m not expecting you to manually go through the files and strip out the whitespace yourself 🙂
Compress Images
When it comes to slow loading websites, images are usually to blame. With the advent of faster internet connections, people seldom bother checking the filesize of the image they want to use for their featured image on their latest post. They just choose a nice looking high res one and up it goes. This is a mistake, especially if your blog layout is loading lots of them on its homepage.
There are plugins out there (and web based tools) that will compress your image for you on the fly or you can consciously make sure you lower the size/quality of the image before you upload. This will ensure that your blog stays fast. Or simply utilise thumbnails on your homepage instead of large splash/carousel style imagery.
Defer Parsing
A common practice is the defer the parsing of any JavaScript files until the rest of your content is loaded. As the files perform solely front-end tasks there is little point calling them as they can’t be used until the rest of the site has loaded anyway. By placing them in the footer the user is not waiting to see your main site content whilst a hefty JavaScript file loads in the header. This improves the users experience and speeds up load time massively.
Utilise CDN’s
CDN’s (content delivery networks) can be a huge help if your current web server is struggling to serve all your content. You can make use of public CDN’s to call common libraries from third party servers such as jQuery or Bootstrap. Or you can setup your own account on a given CDN and have it remotely host your content such as all images etc.
Most CDN’s are completely customisable so you can serve as little or as much data as you like whilst freeing up your own web server to handle/serve your core content.
Page Caching
Page caching is a great way to speed up your blog. Particularly if you have a lot of common elements across the various pages of your site such as large header and footer areas with consistent content.
Caching isn’t really something you can do yourself manually but there are lots of plugins out there which will take a copy of your dynamic page and pretty much serve it as a static page with periodic refreshes. This makes your site load much quicker for the user as it is literally downloading and displaying a flat HTML file rather than running scripts with lots of database calls etc.
Combining Files
Combining files is another feature of the various “site speed” plugins out there and is a quick and easy way to decrease page load time.
Each time a new file is called from the server, a request is sent and the file is then retrieved. This whole process even before the files contents are downloaded takes time. As you can imagine, this time can soon stack up if you’re calling lots of different CSS files such as ones for plugins, your core theme, its mobile version and so on. The same goes for JavaScript.
If you were to combine all these files into one single CSS file and one single JavaScript file, the server would only need to make 1 or 2 requests instead of the 10+ it may have been making previously.
Conclusion
If you’re a WordPress user with significant traffic you’ll know of the potential speed and performance issues only too well. Even if you’re running a lightweight theme, with anything more than a few hundred hits a day you’re going to have issues.
In this case, I’d start with the plugins 9 times out of 10. They pretty much combine most of the methods I’ve documented and can all be setup and installed with a couple of clicks. However, I can appreciate not everyone uses WordPress and some of you may want to perform each task manually. That of course is your prerogative and some would argue the best way to speed up WordPress is not to install more plugins! But the decision ultimately, is yours.