Web Developers – How to Optimise a CMS Driven Website

558

A content management system (CMS) driven website solves a lot of problems presented in modern day websites; namely the ability for people without web development skills to edit their website. The ability to keep a website up-to-date is important for a number of reasons, none more so than to retain your visitors.

As with most solutions, a CMS presents further problems; most commonly, performance issues. Here’s a few ways to mitigate these issues and ensure your website loads quickly. There are a lot of guides on how to specifically speed up certain CMS platforms but I’ve taken a step back and provided solutions for general CMS optimisation problems. If you are looking for web developer jobs then having this set of tips can really give you an advantage over the competition.

  1. Page caching

If you are running a site that serves thousands of visitors then these database queries, however much you have optimised them in step 1, are going to be intensive. It’s going to be a hit on your bandwidth (which could increase costs) and also slows down your site.

Solution. Page caching. When a page is first retrieved it is stored (cached) as a static page (e.g. HTML) and then further visitors will be served that static page. No database calls means the site is back on par with the speed of static sites. If you edit the content of the page in the CMS then the cache will be cleared so visitors still receive a up-to-date version of the site and not a cached one.

  1. Clever coding

If you analyse a CMS template/theme you will see that there can be up to 20 database calls on a page. Whether this be the title of the page, the date an article was posted or the location of a stylesheet. The reasons why they are dynamic in the first place is to provide flexibility, often provided through options pages.

Solution. Have a look through your website. Are there any settings that are never going to change? If so you can hardcode these into your themes so they do not require an extra database hit, which in turn will load the pages quicker. Do you need the footer text to be driven by a text field on the options page? Probably not.

  1. Using a Content Delivery Network (CDN)

Using a CDN such as Amazon Cloudfront is undeniably a way to speed any website up. When a request for a file (such as an image) is requested it is served by the CDN from the Amazon storage system (Amazon S3). Not only do you have the benefit of having your image stored on a more powerful server (Amazon S3) but whilst you are being served the image you can also be served the rest of the site simultaneous. It’s not only file sizes that are the problem but the amount of requests made on a server.

  1. Optimise the database

Installing plugins not clearing up afterwards can cause problems. The larger the database the more the longer the search queries.

Optimise your database by clearing out tables and data that are not needed. If you’re searching through 10,000 entries, rather than 20,000 this will speed things up considerably.

  1. Broken links

A user’s browser might spend time looking for that JavaScript or CSS file that doesn’t exist, or an image that has been deleted. It will retry a certain amount of times and it’s the times of, and in between, those requests that can increase the page load speeds.

Analyse your code and get to know it. Make sure that if the page has tried to load an image and if it hasn’t investigate as to why. Knowing these and more skills are essential for a web developer. The industry is booming with a multitude of apps and websites being built every day. If you are hiring a new wed developer make sure they understand all this and more.


Comments are closed.