Skip to content Skip to navigation

Tuning for Performance

What's better, fast or slow? That's right. Fast. There are a couple of ways you can tune the performance of your Drupal site to decrease page load times. Below are two simple things you can do today.

Drupal Core Performance Settings

  1. Go to admin/config/development/performance (Drupal 7)
  2. Check all the checkboxes:
    • Cache pages for anonymous users
    • Cache blocks
    • Compress cached pages.
    • Aggregate and compress CSS files.
    • Aggregate JavaScript files.
  3. Choose an appropriate minimum cache lifetime. If content on your site does not change very frequently, you can safely set this to the maximum of 1 day.
  4. Typically you would set the expiration of cached pages setting to 1 day also (or whatever you set minimum cache lifetime to). This setting applies to browser caches, for example.

Screenshot of the Drupal core performance configuration screen

Views Caching

On the edit page for each View, under the "Other" section, there is a setting for Caching. You can set separate values for the Query Results and the Rendered Output. If your site content does not change very frequently, you can set that at a long duration, such as 6 days.
Screenshot of the Views edit page with the caching setting highlighted

Screenshot of the time-based caching setting for Views

Screenshot showing a cache lifetime of 6 days for Views query results and rendered output

These two simple steps will improve page load times for anonymous users dramatically.

What Happened to My Changes?

The tradeoff with an aggressive caching configuration is that improved performance comes at the expense of changes going "live" instantaneously. I.e., if you make a change to a node, or a View, it is possible that anonymous users may still see the old, "cached" version.

You can clear all the caches by clicking the "Clear all caches" button at admin/config/development/performance, or under the Home icon in the black Administration Menu:

Screenshot showing how to clear Drupal caches via Drupal core

Screenshot showing how to clear Drupal caches via the Administration Menu

Further Reading