Speed up your new website

AddThis Social Bookmark Button

So you have finally built your new dynamic website running off a CMS such as Joomla or Wordpress but it is slow to load... You are not alone. Dynamic websites based on database driven content systems are often slow especially if you have included lots of modules and components.  Customers will not wait for a slow site to load so the faster your site loads the more likely visitors are to stick around and look around. I have more than doubled the speed of my site in recent weeks and I wanted to share the tips and tricks I have discovered to help you speed up your site. Read on to find out how...

The first step is to benchmark you site. Sites such as http://tools.pingdom.com will allow you to measure load time of your site to see how it compares to other sites. The first time will always be the slowest as your site has to load completely. The second time should be even faster especially if you have caching enabled. Running each test twice to see both of these numbers is important as you want to ensure returning users have an even faster experience than new users.

Another favourite tool of mine is GTmetrix which provides similiar benchmarking capabilities including a PageSpeed and YSlow rating.

If you are using Google Analytics you can also take advantage of the inbuilt Site Speed Suggestions. Look for it under Content > Site Speed > Site Speed Suggestions. You can also use this tool without Google Analytics from the Google Developer PageSpeed Insights. There is even a plugin for Chrome you can use for more detailed analysis.

Don't be disheartened now... Your first results will be bad and that is good. You need somewhere to start from. Now it is simply a process of making changes and test, test, test. Don't expect the results to be fantastic either, a significant improvements is what you are looking for. Most major websites score between 70 and 80 on all of these tests so if you can get your site into this range you are in good company.

First, I start with the easy ones. Do you have images on your site that are actually loaded from other sites. Can you embed this image on your site? Do you have images that are big (>16KB). Can you try compressing them in PNG or JPG so they are significantly smaller? One or two large images can throw the whole thing out.

Secondly, if your server supports it enable GZIP compression. In Joomla 2.5 this is under Site>System Configuration>Server. GZIP will compress your files before they download ensuring less data is sent to clients which speeds up the load times and reduces your bandwidth usage. Wordpress users should install the W3 Total Cache plugin and go to Performance>Browser Cache to enable this feature.

Next, does your site support caching? Can you turn on browser caching and application caching. In Joomla 2.5 enable the System Cache plugin and enable browser caching in it's settings. This will save your users constantly redownloading pages from your site if they do not change. Also go to Site>System Configuration>System and enable the cache option. Wordpress users can use the W3 Total Cache plugin to also configure caching. 

Finally it is time to minify your Javascript and CSS. Wordpress users can do this using W3 Total Cache but Joomla users should download the JCH Optimize plugin to perform this. This process compresses your Javascript and CSS files into a single file and can then also GZIP it to improve performance. When you first configure this plugin under advanced exclude all modules. This will skip all of the custom modules you have built into your website. Test, test, test and benchmark. Now, if you are feeling more comfortable try turning this to No. It is highly likely something on your site will not work. Find this module and using view source in your browser find out the javascript or CSS that is meant to run here and add it to the excluded files folder and test again. Repeat this process enough times and you should be able to get your site working successfully with most of your CSS and Javascript minified and gzipped. In my site for example, I found the image slider and my virtuemart shop would not work correctly but everything else did, so these are now manually excluded. Once you get this balance right run all of your original benchmarks again and compare. You should now see a noticeable improvement. 

Congratulations. You have now improved the performance of your website and your visitors will thank you.