Top Lines

Optimising Concrete5 Website Performance

by David Reeder, 24 June 2016

Dave Reeder
Optimising Concrete5 Website Performance
There are different things to look at when optimising page load times on Concrete5 websites. Let's take a look at our options...

The first area to check is the server.

Server Optimisations

In this article we deal with Linux servers. Here are some important settings to change to make sure your server is delivering your Concrete5 website as quickly as possible:

Compression - Using GZIP on the server means it compresses your files to make them smaller before delivering to web browsers so there is less work for the browser to do and, so potentially the page will load quicker.

In cPanel there is an option called "Optimize website" which you can use to tell the server to compress files, or you can add code in the .htaccess file:

<ifmodule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts    
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript    
  AddOutputFilterByType DEFLATE application/x-javascript
</ifmodule>

Keep Alive - This is a setting which you switch on or off in WHM. Switching it on can help speed up the website loading times.

Set Expires Headers - Expires headers tells the browser whether to serve cached versions of files or not. With a few simple entries in the .htaccess file, this will help optimise your website:

# Expires Headers - 2678400s = 31 days 
<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  ExpiresByType text/html "access plus 7200 seconds"
  ExpiresByType image/gif "access plus 2678400 seconds"
  ExpiresByType image/jpeg "access plus 2678400 seconds"
  ExpiresByType image/png "access plus 2678400 seconds"
  ExpiresByType text/css "access plus 518400 seconds"
  ExpiresByType text/javascript "access plus 2678400 seconds"
  ExpiresByType application/x-javascript "access plus 2678400 seconds"
</ifmodule>

PHPCaching - Using OPcache or Memcache on your server to cache PHP functions is definitely recommended and should speed up dynamic websites using PHP, like Concrete5.

You can create a file called flushcache.php and add the following function:

<?php
opcache_reset();
?>

When you browse to this file, it'll flush the cache.

Google Pagespeed module - Google's Pagespeed Module will help you optimise your website for high speed page loading times and achieve a better score on Page Speed Insights.

It can be a bit a pain caching things in development, but luckily you can turn it off in .htaccess for your dev site:

<IfModule pagespeed_module>
  ModPagespeed on
  ModPagespeedEnableFilters collapse_whitespace, remove_comments    
  ModPagespeedDisallow http://dev.mysite.com/*
</IfModule>

Specify a Vary: Accept-Encoding header - Specifying the Vary: Accept-Encoding header instructs the proxy to store both a compressed and uncompressed version of the resource.

Application Optimisations

In the Concrete5 application/website itself, there are a number of things you can do to decrease page load times:

Cache - Concrete5 has an excellent caching system built in. Make sure this is turned on:


concrete5-caching-for-performance.jpgCheck for slow performing blocks - Some blocks are slower to load than others. Make sure they are caching, or swap them out for other blocks.

The Network tab in Chrome can be used to show which parts of a page are slow to load:

Network tab - check site speed and performance

Use Addons

There are also useful addons to help you debug and fix speed issues in Concrete5 websites:

Speed Analyser - Speed Analyzer gathers information about how fast a page is rendered. It's a tool that can be used to answers questions like "Why is my website slow?" or "Why is this page slow"? Read more...

Image Optimizer - Image Optimizer incorporates various compression tools and optimizes your images. This will lead to smaller images and ultimately makes your website faster.  Read more...

Minify HTML - This add-on automatically compresses your HTML output. HTML compression results in smaller files and faster loading times. It can also improve your SEO rankings. Read more...

Cache Warmer - If you clear the cache, all pages need to be regenerated. Of course you wait until your visitors have requested your pages, but their page loads might be significantly slower. Cache Warmer can automatically generate cache files for pages that allow Full Page Caching. Read more...

Devoda Page Speed Checker - Page Speed Checker is all about measuring the performance of your concrete5 webpages for mobile devices and desktop devices.  Read more...

Extreme Clean - A suite of extreme cleanups to remove obsolete data, inspired by the concrete5.6 Extreme Clean addon. Read more...

Join the Discussion...


Back to Blog

Ask a Question...

Please complete the form below to send us a message:

Stay Informed.

To stay up to date with special offers, news & tips, please subscribe to our newsletter:

Please note, we never share your data with any third party and you can unsubscribe from emails at any time and request that your data is deleted.