why Drupal speed is important
Having a fast Drupal website is important for three key reasons:
- SEO: speed is one of the factors used by search engines to rank websites; faster sites are prioritised on search engine results pages and therefore tend to gain more organic traffic
- User satisfaction: people have short attention spans and expect websites to load quickly, with up to 50% of users exiting a site if there’s a two second delay in loading
- User engagement: faster sites have better user engagement, such as page views and conversions
With these important factors in the mix, wanting to maximise your Drupal website speed is a no-brainer! A faster website will result in more visitors, happier users and increased conversions – and it may even boost your profits.
how to check Drupal site speed
Before we start optimising Drupal speed, it’s a good idea to get a baseline of your current website performance.
We recommend using GTmetrix, which is a great, free online tool. Simply go to the GTmetrix website, type in your URL and click ‘Test your site’.
A performance report will be generated, including two speed scores – PageSpeed and YSlow. By navigating through the tabs, you’ll also find lots of speed and performance tips. The ‘Priority’ column gives a helpful indication as to which actions should be taken first.
As well as testing your homepage, it’s also worth checking the speed of any other important or high-traffic pages on your Drupal website. Make sure to note down your speed scores (or sign up for a GTmetrix account) so you can keep track of speed changes and improvements over time.
5 tips to optimise Drupal website speed
We now share our top five tips for optimising your Drupal website’s speed…
1. Enable caching
Caching involves storing your website’s data in a local storage space, aka cache. This means creating a snapshot of your website pages and files when they are displayed for the first time, so they can be loaded more quickly for future website visits.
Browser caching – the main type of caching – is where internet browsers hold the most recently downloaded webpages in their caches. This means they don’t have to re-download your site files every time your site is requested and thus giving your Drupal website a massive speed boost.
Browser caching is enabled by default for Drupal 8 and 9. To enable caching for Drupal 7 and earlier versions, you’ll need to go to Configuration > Performance > Caching.
Whatever Drupal version you’re using, we also recommend installing Advanced CSS/JS Aggregation. This module offers advanced catching options to boost your site’s speed even further, though it can take quite a bit of tweaking to find the best settings for your site.
2. Select rapid hosting
Hosting providers store your website’s files on a server and provide infrastructure to enable your site to function online.
Whenever a user types in or clicks on your URL, the relevant browser requests your site files from your server. Your host then processes and responds to this request, this enabling your site to be displayed.
How quickly your site loads depends on how quickly your hosting provider is able to process browser requests and provide site files. Speed is also affected by the geographical location of your server – with shorter distances between server and user increasing site speed.
There are many factors to consider when choosing a hosting provider, including cost, type of hosting and security – but make sure to factor in speed too. If you’ve made lots of other speed optimisations and your Drupal site is still slow, try upgrading your hosting package or seeking a new provider.
If your site regularly receives visitors from different, widely geographically-spread countries, it may also be worth setting up a Content Delivery Network (CDN). This is a network of servers worldwide, thus reducing the distance your website files need to travel to users in different locations.
3. Compress images
The heavier your site, the longer it takes to load. Images are usually the largest, slowest website elements, so it’s vital to compress them and reduce file sizes to optimise Drupal website speed.
For best practice, crop and edit images to fit their intended purpose on your site, before uploading. Pixlr and Resize Image are great, free online image resizing tools for this purpose. For example, if you only need a thumbnail, upload a thumbnail-sized image and not a 10MB high-quality file!
If your website uses Drupal 7 or an earlier version, it’s also worth installing a module such as Image Optimize to further compress imagery and improve site speed. For Drupal 8 and later versions, the Drupal core automatically resizes and scales site images to maximise speed.
Another great way to boost website speed is with lazy-loading, where images below the fold are not loaded until a user scrolls down. To enable this feature, simply install Drupal’s Lazy-load module.
4. Keep modules up-to-date
Surplus or outdated modules are another common way in which Drupal websites are slowed down.
Drupal beginners often think that fewer modules means a faster site. But actually, it’s the quality and usefulness of installed modules is much more important than the quantity.
You can check if any specific modules are slowing down your site by disabling each module individually and then running a speed test with GTmetrix. This will help you weigh up whether a module’s features and functions are worth any reduction in site speed.
It’s also important to update modules to the latest versions to keep your site is as rapid as possible. You can find out if any updates are currently needed by going to Reports > Available updates and clicking ‘Check manually’.
5. Optimise background processes
Our final tip to boost Drupal speed is about scheduling and optimising background website processes.
Background processes are continually taking place to keep everything running smoothly on your Drupal website. These include publishing scheduled content, making backups, and blocking hacking attempts.
As you’d expect, the more background processes taking place at the same time, the more your site will be slowed down. In particular, backups take a up a lot of bandwidth, so you should these are schedule these for low-traffic times, such as during the night.
To further optimise site speed, the Background Process module is well-worth installing. It provides lots of options for scheduling which background processes take place and when.
We hope you enjoyed this blog about how to boost your Drupal website speed. For more expert Drupal tips, read our ultimate Drupal optimisation guide covering everything you need to know about optimising and maintaining your Drupal website.