How to come first in the site speed race of WordPress

The online world can sometimes feel abit like the Olympics; jumping through hoops to please the search engines with excellent SEO, while racing to get the next blog post up quickly and overcoming the obstacles that are your competitor’s deals. But what about the speed your site is working at? With all the content and coding requirements we work to meet, it can be easy to forget that an increase in content means an increase in load time. And nothing is more likely to put your visitors off than an unreliable and slow website. And it’s not just your visitors who will be unimpressed. Google has fast been increasing the emphasis it puts on site speed as a ranking factor, meaning that if your site isn’t up to scratch, you can rest assured Google won’t be recommending it in a hurry. Here we unpick the best ways to rectify the situation before it does real damage to your website reputation in the online world…

The geography of your data centre is crucial

Your server is what pushes your site out to clients and potential website visitors, so making sure it is located close to that target market is crucial. It’s easy to find out the speed at which your site is being pushed out to Google at, from within your (webmaster tools) search console. Ideally this should be running to just a few hundred milliseconds at a maximum – any slower and Google will start to disregard your site. geography

Dynamic Caching

Dynamic caching is one of those terms thrown around by online experts – but what does it really mean? Essentially dynamic caching deals with the problem created by page generation load time, as by default WordPress will load each page afresh every time a new visitor comes to your site. This obviously adds a delay to the load time of each page, which can cause a major problem for your overall site speed. Dynamic caching deals with this delay by saving a copy of each page and then simply regenerating the copy to each visitor – rather than loading each page from scratch every time. This creates a more streamlined load time across your whole site by allowing the server to push content out to more individuals at once – more quickly! In order to implement dynamic caching, users tend to opt for a plugin or by enabling it on the server itself via a user such as Hostgator. The latter option is easy for WordPress users who have optimised hosting as it is as simple as switching the feature on. For those who don’t, the plugin option is just as good and will perform the job to the same effect.

A Content Distribution Network (CDN)

A CDN allows your website server to find out the IP address of each visitor to your site, and deliver to them the recurrent content from a server nearest to them. By recurrent content we mean the things that never change – your images, backend coding and CSS to name a few. Engaging the use of the CDN through your hosting network means than users all over the world will receive content quickly and effectively, without long load times for those who live farthest away. Simply enable the CDN setting in the backend of your WordPress site and watch the visitors roll in – from all over the globe.

Understand Javascript and how to use it to your advantage

Javascript is great, and almost all the websites we can think of use it in some capacity. It enables your website to respond to the device it is being viewed on, resizing images and other content to maximise enjoyment. But that doesn’t mean it’s perfect, and it adds to page load time if you don’t optimise it to work in your favour. Essentially what you want to do is tell Javascript to start loading only after the page has loaded and is fully visible to the website visitor – and this requires help. A plugin such as Autoptimize will enable you to aggregate Javascript so that it only loads once your website visitor is already enjoying the content. This means that by the time they get as far as the table of information you’ve included, it will have resized appropriately – without impacting on the load time of the entire page.

The beauty of CSS

The point of CSS is to make your WordPress site look great. While loading CSS files takes a while and in an ideal world would be delayed until after the page has loaded, doing this would cause your webpage to look unstyled and unattractive. That’s why we turn to Inlining for CSS – isolating the CSS rules that apply to the visible elements of your web page, and applying them to every page of the website so that they load instantly. This is a complicated one, but luckily online tools are available to help – simply enter your URL into an online resource such as ‘SiteLocity’ and it will automatically generate the CSS for you. Copy the rules it presents to you and paste it into the Settings are of Autoptimize (something you should already have if you follow our tips for a successful Javascript!) And voila! Beautiful web pages that load at the drop of a hat.

Images

We get it, images are vital to your website. Whether it’s photos of your work or images to supplement your content, you need them. But they’re also adding to the size of your web page and by loading them afresh with every website visit, they’re draining the web loading capacity and adding to your site speed. That’s why we turn to lazy loading. By enabling this, images won’t be loaded until the visitor has scrolled down far enough to see them, ensuring that only those images that will be viewed are actually loaded – i.e. if the visitor leaves the page before they reach an image, no harm done as it didn’t load anyway! Enable lazy loading from the settings inside your WordPress site and watch the images appear by magic – as and when they’re needed.

Do you really need that smiley face emoji?

Emoji’s add a whole load of useless code to your website, and yet it loads afresh every single time the page is viewed. Yet again we turn to Autoptimize to help us here, simply selecting the option that removes WordPress’ core emojis from your CSS and subsequently cleaning up your backend coding so that only the really vital information is being loaded. Put this all together and you’re sure to place in the site speed race rankings – just make sure you don’t get lost in the world of site speed and allow your content and SEO to suffer. Online is all about balance and Google expects you to excel in all the relevant areas – not just one.  

Adding Google Analytics to WordPress

Google Analytics is one of those tools that website developers throw at you as a tool you simply must use. You download it, you look at it occasionally, but you don’t necessarily understand exactly what it all means. All you know is that it’s full of graphs and percentages, and if the percentages are in green then that’s a good thing. Google Analytics is a tool designed by Google to look at the people visiting your website and then provide you with a breakdown of who they are. What did they search for in order to find your site? Which pages did they visit, and how long did they stay on our site? How many visitors did you have this week compared to last week? By understanding this information, you have a great opportunity to tailor your website specifically for your regular audience, making sure the most popular pages are easily found and well optimised for different devices. You can also understand exactly which keywords are leading visitors to your website, allowing you to build your SEO around them. When using WordPress, Google Analytics can be connected to provide you with seamless information at the click of a button – and here’s how to do it. Get a plugin Plugins are easy to use and highly regarded, especially in the world of SEO and Google Analytics. MonsterInsights is a popular one with both a basic package and a more premium option available, meaning no matter what level you are working at you will find a suitable analytics package. Once you’ve downloaded the plugin to your WordPress site, a menu called “Insights” will appear on your site. Once you’ve completed the set up (through which you will be fully guided but the setup wizard) you can view analytics reports as often as you want, digesting the information into sections that work for you and are most applicable to your site and your audience. Through Google itself As a Google add-on, Google analytics is of course available through the search engines own dashboard. To use this, you need to add a snippet of your site’s code to your google files, being careful not to destroy your own code in the process. To do this, go into your WordPress theme’s manual code editing interface and find the header.php file. Paste the code from Google Analytics into this file after the ‘body’ tag and save the changes, before reuploading the file to your server. Alternatively, you can update this through your WordPress functions file, which will automatically add the tracker to every page of your site. To do this, paste the following code into the functions.php file on your theme: <?php add_action(‘wp_head’, ‘wpb_add_googleanalytics’); function wpb_add_googleanalytics() { ?> // Paste your Google Analytics code here <?php } ?> This will then be live on your site, and you’ll be able to view your analytics reports as and when you need them. How do I view the data? We’ve referred a few times to the reports that will become available as a result of Google Analytics, but how do you view them? Give WordPress adequate time to update Google with your data before searching for the reports, as if you move too quickly the data will be out of date and useless. To view the data, simply head to your Google Analytics dashboard and spend some time familiarising yourself with what is available. You may find it useful to engage in different levels of activity week on week to see which is the most successful, before deciding on a long-term strategy moving forward. In the long-run, understanding your data can be a great tool for boosting sales and improving website traffic, so Google Analytics is well worth your time.