Speed Up Drupal 8

Five ways to speed up Drupal 8 sites

WebsitesCategory
3 min read
Steve Burge

Drupal is a fantastic CMS, but site speed can be an issue if the site is complex or on an underpowered server. With Google placing more and more importance on the speed of your site (especially on mobile devices), this is a very important issue. In this post, I’ll give you five ways to speed up Drupal 8 sites, illustrating the tips with a video from our “How to speed up Drupal 8 sites” class.

1. Cache

Cache to Speed Up Drupal 8
Image captured from this OS Training video

The absolute best way to speed up a Drupal site is to learn how to use the cache. Drupal’s cache system will store a copy of requested pages in an easily accessible location. So, once one visitor sees a page, all the subsequent viewers will find that the page loads more quickly. Even if you don’t enable any extra modules, Drupal provides some powerful caching.

2. Extra caching modules

Drupal has two core caching modules that are enabled by default.

The Internal Page Cache module. This caches pages for anonymous users in the database. Pages requested by anonymous users are stored the first time they are requested, and then are reused for future visitors.

The Internal Dynamic Page Cache module. This is a key feature, new to Drupal 8. The Dynamic Page module aims to speed up the site for both anonymous and logged-in users.

This video explains more about the core caching in Drupal 8.

Many Drupal site builders also add an extra caching layer such as Redis or Varnish.

Over the past few months, Drupal 8 developers have been working hard to make the system faster. Drupal 8 now includes the BigPipe module, which implements ideas borrowed from Facebook. This module allows sites to deliver personalized content more quickly.

BigPipe Module to Speed Up Drupal 8
Image captured from this OS Training video

3. Bandwidth optimization

By default, Drupal ships with a large number of CSS and JavaScript files. To ensure that all those resources load quickly, Drupal makes it easy to aggregate all the files so that they load together.

Drupal 8 Bandwidth Optimization
Image captured from this OS Training video

4. Image styles

The various sizes of your images can have an enormous impact on your site's speed and its performance on mobile devices. Fortunately, the Drupal 8 core provides tools for controlling and optimizing the size of your images. Using the Image Styles feature, you can deliver different image sizes to different devices. Here’s how Image Styles work.

Drupal 8 Image Styles
Image captured from this OS Training video

5. Uninstall your unused modules

One more thing you can do to speed up Drupal 8 is to remove all the modules that aren't being used. Every module will add a performance hit to your site. I’ve seen Drupal sites with hundreds of installed modules, many of which aren’t actively being used.

The process of uninstalling modules is a little different in Drupal 8, so if you’ve used Drupal before, watch this video and note the changes.

Drupal 8 Uninstall Modules
Image captured from this OS Training video

How to speed up Drupal 8: Summing up

While there are many factors that can determine the overall speed of a Drupal site, making sure that caching is tuned and images are sized correctly are two things you should be doing out of the gate. Coupling those approaches with sensible bandwidth usage and removing the overhead of unused modules, and you should have yourself a winner.

Also, check out GoDaddy's Drupal Web Hosting offering.