Improving Drupal Speed

Drupal is a fantastically powerful content management system. But that power comes at one very significant cost, speed. A Drupal powered site may suffer from slow page loads.

This very blog is powered by Drupal, and I admit that at times its speed is on the slow side. I have recently found a few ways to improve the speed. These are:

Caching

Drupal has built in caching capabilities. This caches the output of pages and therefore reduces the number of database queries when anonymous visitors (visitors who are not members of the site and therefore not "signed in") access the website.

To enable caching, go to: Administer » Site configuration. Turn caching mode to "Normal". You can try advanced caching, but this does come with side effects, so is not recommended unless you really know what you are doing.

When setting the minimum cache lifetime, the longer the better in terms of speed. The cost is that visitors will not see new content for the set amount of time. As a guide, I have set this blogs minimum cache lifetime to 3 hours.

Aggregate and compress CSS files

Aggregating and compressing CSS files saves on valuable bandwidth and can offer a significant speed boast.

To enable CSS file aggregation and compression, go to: Administer » Site configuration (as with caching). Turn Aggregate and compress CSS files to enabled.

Remove unwanted modules

There is no point in having modules that you do not use enabled. Modules lead to extra database queries, so turn off any modules that you do not use.

This site

Enabling caching and CSS file compression/aggregation has improved page load times on this site but approximately 50%. I admit, there is still room to improve the speed further. I will report back when I find other ways to improve the speed of Drupal.

If you liked this, you'll love my book, Master Drupal Module Development.

"..the must have drupal developers book"


Feeling stuck with Drupal 8 module dev?

Get the free 7 lesson course that will help you get started today without feeling overwhelmed.

  • Create Drupal modules with just a few commands using the Drupal Console
  • Create custom pages
  • Create custom blocks
  • Create admin forms
  • Demystify routers and controllers
  • Bonus material

Find out more


Comments

I'm really enjoying the design and layout of your site. It's a
very easy on the eyes which makes it much more enjoyable for me to come here and visit more often.
Did you hire out a designer to create your theme?

Outstanding work!

Add new comment