Basic Steps to Better Performance (Part 2)

In the first part of this article I looked briefly at how to optimise your website assets for better performance. For the second part of the article I will focus on some more generic techniques which can help you reap the benefits of lightening load speed.

As I said before, please do not consider this a comprehensive list but is based on our experience of actions that tend to have the highest impact for Wordpress users. So let us continue.


    1. Lazy Loading

    This is a design pattern that allows assets and objects within your wordpress site to be loaded only when they are needed and initialized. The easiest way to implement lazy loading is to integrate and activate a WordPress plugin like Lazy Load or WP Rocket. There are other ways you can implement lazy loading that are code-based. Either from scratch using event handlers or a jquery plugin. either of these options require some programming experience.


    2. Minification

    Effectively this means removing any redundant data from within your codebase. This reduces the size of the files that you load to your website and also has the added benefit of making copying code when viewing source more difficult. Again WordPress has plugins that can do this for you or you can do it when compiling code.


    3. Caching

    Wherever possible you should set up caching both server side and bowser side. This prevents unnecessary loading of assets or querying of data by saving HTTP Requests according to certain rules on a fast performing server closer to the user. This negates the need to hit the underlying web server each time. Server side cache engines like Redis are designed for fast delivery of assets, files and data. The browser cache can do the same but retrieves assets from the browser rather than the server. Again WordPress has plugins to help you set this up. Redis and WP Rocket to name a couple.

    Please be aware that you need to employ cache busters or set your cache expiry carefully to make sure that updates are reflected in a timely manner. Without that and a flush of server side caches updates of your site may not display properly.


    4. CDN

    May not be necessary if you targeting a geographical niche area but a lot of performance measures recommend it. CDN stands for Content Delivery Network and they provide a geographically distributed network of proxy servers dedicated to high performance delivery of content. WordPress uses S3 for storage but for proper CDN you can implement Amazon’s Cloudfront but there are many others available, like Cloudflare, maxCDN etc etc


    5. Serve static pages

    An extreme option and this may really only work for landing pages where conversion is everything and no dynamic content is required. There are tools that take your code and convert it to static files. One example of such a service is convertri: This converts code to static html and serves them over a CDN. This is an extremely high performance option.


    6. Hosting

    Several hosting and server side configurations can impact your sites performance irrespective of how well crafted your WordPress website. Firstly there is the software stack used, generally APACHE or NGINX. A native NGINX stack has a speed advantage, although bear in mind this means no htaccess file use. If htaccess is essential to you then a hybrid NGINX + APACHE stack is offered by some providers. Secondly make sure your host uses a recent version of PHP. Version 7+ has a considerable performance advantage over previous versions. Gzip compression should be activated. Finally check your server resource and bandwidth utilisation. A shared host might be suitable if you are only running a small site with limited traffic, but once you start to scale you should look at switching to a VPS.


    7. Monitoring and adjustment

    You have to know that this is an ongoing process to keep your performance up to speed. The suggestions here will put some building blocks in place but you need to keep monitoring and adjusting to make sure that everything you do gives you the best possible performance.

I hope this has helped in one way or another but I am happy to hear your opinion here as I understand this is in no way gospel. Get in touch and let me know your comments, ideas and good luck with getting top performance out of your websites.

If you need help simply come and talk to us at PageSpeed here or start by doing a free scan of your website below. Please note our services are for WordPress websites only.