Optimising Concrete5 Website Performance
by Dave Reeder , 24 June 2016
The first area to check is the server.
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:
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:
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.
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:
The Network tab in Chrome can be used to show which parts of a page are slow to load:
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...
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...
Join the Discussion...