
On this page:
- Improving performance for a better user experience
- Part 1 — Understanding performance
- Part 2 — Drupal and performance
- Part 3 — Top 10 ways to improve Drupal performance
- Part 4 — The importance of website performance
- Part 5 — Our contribution to helping drive better performance
- Part 6 — How we can help you with Drupal performance
Improving performance for a better user experience
Website performance is crucial for ensuring an exceptional user experience, retaining visitors and achieving higher conversion rates. In today's fast-paced digital landscape, users expect websites to load quickly, function smoothly and provide a seamless experience across devices. A slow or unresponsive website can lead to increased bounce rates and poor search engine rankings.
Drupal, a powerful open-source content management system (CMS), is widely used for creating and managing a variety of websites. With its extensive features, flexibility and scalability, Drupal has become a popular choice for web developers and site owners.
This comprehensive self-help guide is the second part of a 6-part series that aims to give you in-depth knowledge and actionable insights to enhance your Drupal website across the 6 metrics of:
- Security
- Performance
- Accessibility
- Patches
- SEO
- Carbon emissions
In this guide, we’ll explore the importance of website performance, its impact on user experience and conversions, and the benefits of optimal performance. Additionally, we’ll delve into the contributing factors that influence performance, as well as actionable steps to improve it on Drupal websites. By following this guide, you’ll be well-equipped to enhance the performance of your Drupal site and reap the rewards of a faster, more efficient online presence.
Go to our top 10 ways to improve Drupal performance
Part 1 — Understanding performance
What is website performance?
Website refers to the speed, efficiency and overall responsiveness of a site. It encompasses aspects such as page load , server response and resource . A well-performing website not only improves user experience but also has a positive impact on search engine rankings, conversions and customer satisfaction.
Why is performance important?
Ensuring optimal performance for your Drupal website is crucial for:
User experience: A website's performance has a direct impact on user experience. Slow loading pages and unresponsive elements can frustrate users, leading to higher bounce and lower engagement. On the other hand, a fast and efficient website keeps visitors engaged, increasing the likelihood of conversions and return visits.
Search engine rankings: Search engines like Google consider performance an essential factor when ranking websites. A fast-loading website is more likely to rank higher in search engine results pages , often resulting in increased organic and visibility.
Conversions and revenue: Better website performance can lead to increased conversions and revenue. Studies have that faster loading times improve conversion , as users are more likely to make a purchase or sign up for a service on a website that functions seamlessly. According to , “Nearly 70% of consumers admit that page speed influences their likeliness to buy.”
Global authorities and guidelines
There are several organisations and tools that provide guidelines and best practices for website performance optimisation, including:
Google PageSpeed : this popular tool analyses the performance of a web page and provides recommendations for improvement. You can also run the Lighthouse in Chrome to create a similar report.
MDN Web Docs web performance : the MDN Web site is an open-source, collaborative project documenting Web platform technologies.
Web performance working group : part of the World Wide Web Consortium , this group focuses on developing standards and guidelines for web performance.
Positive impact of performance optimisation
A well-performing website can result in numerous benefits, such as:
- Improved user experience including better mobile UX
- Higher search engine rankings and organic traffic
- Increased conversions and revenue
- Enhanced brand reputation and customer loyalty
- Better scalability to allow for more users
Consequences of ignoring website performance
Ignoring website performance, on the other hand, can lead to negative consequences, including:
- Frustrated users and higher bounce rates, especially on mobile devices
- Lower search engine rankings and organic traffic
- Decreased conversions and revenue
- Damage to brand reputation and customer trust
- Reduced ability to handle higher amounts of traffic
By understanding the importance of website performance and its impact on various aspects of a business, you can prioritise optimisation efforts and create a more successful online presence.
Part 2 — Drupal and performance
Drupal's capabilities and features for performance
Drupal, as a powerful open-source CMS, offers a variety of capabilities and features that can help you optimise your website's performance. These features include:
Caching: Drupal has built-in caching that help reduce server load and speed up page load times. The system can cache various types of content, such as pages, blocks and other entities, and can be further optimised with additional contributed modules.
CSS and JavaScript aggregation: Drupal can automatically aggregate and compress CSS and JavaScript , reducing the number of HTTP and improving page load times. This functionality can be easily enabled through the admin interface and is enabled by default for more recent versions of Drupal.
Image optimisation: Drupal offers built-in image optimisation features, such as image and responsive image , which ensure that the appropriate image size is served based on different use cases, devices and screen sizes. Additionally, there are contributed modules that provide advanced image compression and optimisation.
Lazy loading: Lazy is a technique that delays the loading of non-critical elements on a page until they’re needed. There are several Drupal modules that support lazy loading for images, videos, iframes and third-party assets, improving overall page load times.
Additional modules: The Drupal ecosystem provides a large number of contributed to help with performance optimisation, monitoring and analysis.
Drupal and global authorities' guidelines
Drupal can be configured to align with best practices and guidelines provided by global authorities on web performance, such as Google PageSpeed and . By using Drupal's built-in features and contributed modules, you can implement many of the recommended optimisations and improvements without custom code.
Examples of well-performing and poor-performing Drupal sites
Well-performing sites: two excellent examples of well-performing Drupal sites are Australian Energy Infrastructure and . Two good examples of decoupled sites are Digital Earth and Exploring for the . These websites leverage Drupal's caching, CSS and JavaScript aggregation and image optimisation features, resulting in fast page load times and an excellent user experience.
Poor-performing site: a poorly performing Drupal site may suffer from slow page load times, unoptimised images and excessive HTTP requests. These issues can be addressed by implementing Drupal's performance features and best practices.
Drupal versions and performance considerations
Different Drupal versions come with their own sets of features and improvements related to performance:
Drupal 7: while Drupal 7 offers basic performance optimisation features, it may require more manual configuration and contributed to achieve optimal performance. Drupal 7 has been planning for its End-of-Life (EOL) for a few years, but the final EOL is now set for 5 January 2025.
Drupal 8 & 9: these versions include significant performance improvements, such as the introduction of the BigPipe , which helps deliver content to users more quickly. They also feature improved caching and an enhanced render .
Drupal 10: Drupal continues to build on the performance improvements introduced in previous versions, incorporating new features and best practices to ensure optimal website performance.
By understanding the performance capabilities and features of each Drupal version, you can make informed decisions when building and optimising your Drupal website.
Part 3 — Top 10 ways to improve Drupal performance
The top 10 ways to improve your Drupal website’s performance are:
- Caching
- CSS, JavaScript and markup optimisation
- Image optimisation
- Lazy loading
- Content Delivery Network (CDN) and static site integration
- Database optimisation
- Web server and PHP configuration
- Module management
- Theme optimisation
- Monitoring and ongoing optimisation
1. Caching
What it is: is the process of storing copies of data temporarily in easily accessible locations so that future requests for the same data can be served faster. In Drupal, various types of content can be cached, such as pages, blocks, and other entities.
How it impacts performance: Caching significantly reduces server load and improves page load times, as the server can quickly serve cached content instead of repeatedly processing the same content.
Steps to implement:
Enable page caching in the Drupal admin interface under Configuration >Development > Performance. Configure the cache lifetime based on your content update frequency. Learn more about Drupal’s Internal Page and Dynamic Page .
Configure Views and Panels to use caching based on usage patterns.
Install and configure additional caching , such as , or File , for improved caching performance.
Optimise your caching strategy with advanced modules like Cache Control , HTTP Cache and Sessionless .
Warm your cache for faster response times with the module. Consider using longer cache expiry times along with cache purging and warming as needed.
Use the Cache and Cache features in custom code to provide granular control over your caching strategy.
Install and run the Site audit for cache reports and suggestions.
Above: Screenshot of Drupal’s Performance settings page.
Above: Screenshot of part of Drupal’s Site audit caching reports (1 of 3).
Above: Screenshot of part of Drupal’s Site audit caching reports (2 of 3).
Above: Screenshot of part of Drupal’s Site audit caching reports (3 of 3).
2. CSS, JavaScript and markup optimisation
What it is: Optimising CSS, JavaScript and HTML markup is a simple performance task that includes minification and aggregation. CSS and JavaScript is the process of combining multiple files into a minimal number of compressed files. This reduces the number of HTTP requests required to load a page, leading to faster load times. removes unnecessary spaces and characters from an asset to reduce its size, which lets it load faster as well.
How it impacts performance: By simplifying, aggregating and compressing CSS and JavaScript files and HTML markup, you can reduce the number and size of HTTP requests, leading to improved page load times and a better user experience.
Steps to implement:
Navigate to Configuration > Development > Performance in the Drupal admin interface. Check the boxes for "Aggregate CSS files" and "Aggregate JavaScript files" and save the configuration.
Validate your markup using the W3C or similar, as malformed HTML can be less performant. You can also validate your CSS with a CSS and your JavaScript with your code editor.
Install and configure Minify Source to reduce your markup.
Consider installing and configuring the Advanced CSS/JS Aggregation or Minify for more advanced settings. Note that you should carefully test your site after enabling these types of modules and when changing any settings. Make sure to run before and after performance checks with or similar tools as well as run visual regression to ensure the pages look the same.
Above: Screenshot of Drupal’s Advanced CSS/JS Aggregation module settings page.
3. Image optimisation
What it is: Image delivers images in the most efficient format, size and compression level, without compromising on quality. Drupal provides built-in features such as image , responsive image (based on ) and the GD to optimise images for different use cases, devices and screen sizes.
How it impacts performance: Optimising images reduces their file size and ensures that the appropriate size is served to different devices, resulting in faster page load times and improved user experience.
Steps to implement:
Define image styles in Drupal by navigating to Configuration > Media > Image styles.
Define responsive image styles in Drupal by navigating to Configuration > Media > Responsive image styles.
Apply the image styles to your image fields for all your content entities.
If your web server or hosting provider supports it, you can use the module rather than the default GD/GD2 for some .
Adjust your JPEG quality to the minimal acceptable level by navigating to Configuration > Media > Image toolkit.
Optionally, install and configure additional image optimisation modules, such as Image and Image Optimize . Also, some CDNs provide image optimisation features as well.
Warm your image styles for faster response times with the Image Style module.
Above: Screenshot of Drupal’s Image styles settings page.
Above: Screenshot of Drupal’s Responsive image styles settings page.
Above: Screenshot of Drupal’s Image toolkit settings page with default settings.
Above: Screenshot of Drupal’s Image toolkit settings page when ImageMagick is installed.
4. Lazy loading
What it is: Lazy is a technique that delays the loading of non-critical elements on a page until they’re needed, such as when the user scrolls to a different location on the page. This can help improve initial page load times. Lazy loading is typically used with images but can also be used with iframes, videos and any file asset that isn’t needed for the content currently in view.
How it impacts performance: Implementing lazy loading improves overall page load times by only loading the content that is immediately visible to the user, reducing the amount of data that needs to be loaded initially.
Note: If you’re using Drupal 9.1 or later, loading=”lazy” is added to image field markup by . In Drupal 9.4, a UI was added to allow you to enable or disable lazy loading for image (via both content type and Views displays). In Drupal 10.1, the loading attribute was added to responsive . If there are any image fields that should not be lazy-loaded, you can disable it — but disable it with caution due to the potential performance impact.
Steps to implement:
For additional lazy loading features or older versions of Drupal, install a Drupal module that supports lazy loading, such as , Lazy or OEmbed .
Configure the module settings to enable lazy loading for images, videos, iframes and other supported content and files.
Update your theme's templates to use the lazy-loading attribute (i.e. loading=”lazy”) on any hardcoded image tags as appropriate.
Above: Screenshot of Drupal’s image field loading settings via Manage Display UI.
Above: Screenshot of Drupal’s image field loading settings via Views UI.
5. Content Delivery Network (CDN) and static site integration
What it is: A Content Delivery Network is a system of distributed servers that store and serve copies of your website's static assets — such as images, CSS and JavaScript files — to users from servers that are geographically closer to them. This reduces latency and improves load times. A static rendition of your website takes things one step further so all (or most) of your web pages are served without the need for the Drupal backend. You can still use Drupal to edit your content while having a static “frontend” for the best of both worlds.
How it impacts performance: By integrating a CDN with your website, you can significantly decrease load times for users around the globe, as their requests are served by servers that are closer to their location. Decoupling your website to use a static version of your website for your public users can speed up your web pages as they no longer need to hit the Drupal CMS.
Note: Based on the type of , it can pull assets into its distributed servers or you push them to the assets out. For static solutions, look for options that allow you to push out incremental changes to your website rather than having to rebuild the static site assets every time.
Steps to integrate a CDN:
Choose a CDN provider, such as , , , Amazon or . Install the Drupal CDN (for “pull-based CDNs”), or use a contributed module that integrates with your chosen CDN provider such as or
Update your site's configuration to serve assets from the CDN per the CDN provider’s documentation such as or .
Enable additional performance optimisation features provided by the CDN such as image optimisation.
If you need your website’s files (i.e. typically in sites/default/files or similar) distributed globally as well, you can use or the S3 File System for S3 or check with your CDN provider’s configuration options.
Steps to implement a static website solution:
Choose a static approach for your website such as using the QuantCDN for Quant static or the Tome with a hosting provider extension such as Microsoft or .
For Drupal 7, use the QuantCDN for a static site or the Boost for static page caching.
Install and configure the chosen modules per the provider’s documentation.
Set up your domains on the static hosting provider’s platform. Ideally, you will have a backend domain for your Drupal site, e.g. edit.example.com, that will be locked down for only your site administrators and content editors.
If you have pages that must be dynamically-generated, look at options to “proxy” those URLs/routes to Drupal while keeping the rest of the website static.
Above: Screenshot of QuantCDN’s Drupal module main configuration settings.
Above: Screenshot of QuantCDN’s Drupal module seed configuration settings for pushing content and assets to the CDN.
Above: Screenshot of the Drupal CDN UI module settings.
6. Database optimisation
What it is: Database involves the regular maintenance and fine-tuning of your Drupal site's database to ensure it’s running efficiently and not contributing to performance bottlenecks.
How it impacts performance: An optimised database can improve site performance by reducing the time it takes for the site to retrieve and process data from the database.
Steps to implement:
Regularly check for and remove orphaned or unused and records.
Optimise your database tables using a tool such as , the Drupal or DB modules, or by manually running the "OPTIMIZE TABLE" SQL as needed. See the comparison of these Drupal contributed .
Install and run the WebProfiler for database query analysis per page.
Install and run the Site audit for general database reports and suggestions.
Review other Drupal MySQL optimisation and apply those applicable to your database.
Above: Screenshot of the Drupal OptimizeDB module settings.
Above: Screenshot of the Drupal DB Maintenance module settings.
Above: Screenshot of running OPTIMIZE TABLE on the Drupal batch table.
Above: Screenshot of part of Drupal’s Site audit database report.
Above: Screenshot of Drupal’s WebProfiler info bar with database query summary.
Above: Screenshot of part of Drupal’s WebProfiler database report for a particular web page.
7. Web server and PHP configuration
What it is: Optimising your web server and PHP involves fine-tuning settings to improve the efficiency of your server and the performance of your Drupal site.
How it impacts performance: Proper web server and PHP configuration can lead to improved performance by making better use of available resources, reducing memory usage and optimising processing times.
Note: Using a managed Drupal hosting provider will help ensure your web server, PHP configuration and related infrastructure are optimised for performance. If you’re maintaining your own web server, you should optimise it on a regular basis.
Steps to implement:
Configure your server to use the latest supported PHP version for your Drupal site.
Update your PHP configuration to follow Drupal best practices such as tuning memory and using Opcode .
Fine-tune your web server (e.g. or ) settings, such as the number of worker processes and maximum connections, according to the Drupal server tuning .
Install and configure a cron module such as Ultimate to distribute and optimise your cron runs.
Install and run the Site audit for web server and PHP reports and suggestions.
Install and run the WebProfiler for PHP configuration information.
Use benchmarking to test your performance before and after changes.
Above: Screenshot of Drupal.org’s documentation on Opcode caching.
Above: Screenshot of Drupal.org’s documentation on server tuning.
Above: Screenshot of Drupal WebProfiler module PHP configuration report.
8. Module management and optimisation
What it is: Module management involves reviewing and optimising the Drupal modules installed on your site to ensure that they’re not negatively impacting site performance as well as adding modules that enhance performance.
How it impacts performance: By carefully managing your modules, you can reduce server load, eliminate performance bottlenecks and streamline the functionality of your Drupal site.
Steps to implement:
Review the list of installed modules and disable or uninstall any that aren’t in use or are no longer needed. Make sure to always fully uninstall a module on production before removing the module’s files to avoid orphaned configuration.
Ensure that all installed modules are up-to-date (via Configuration > Reports > Available updates) and optimised for performance.
Use Configuration or a similar method to separate development configuration from production configuration and adjust it to disable the Update module, development modules, and sitebuilding (UI) modules on production.
Avoid use of the Statistics when possible and replace with more performant options (see the last section for possible analysis tools).
If using Drupal 7, disable the PHP Filter for better security and performance. PHP Filter was removed from in version 8.
Install and run the Site audit for extensions and status reports and suggestions.
Review the available performance-related Drupal for your Drupal version and determine if they’d be beneficial for your site. Look for modules that are regularly maintained and have a significant number of instals, and check their issue queues for any critical bugs that may be problematic.
Run on your custom modules to look for issues. You can also do performance profiling on your modules with .
Run the WebProfiler on key pages of your site to look for slow views, blocks, forms, etc.
Monitor the performance of new modules, and address any performance issues they may introduce.
Above: Screenshot of Drupal’s Available updates report.
Above: Screenshot of Drupal WebProfiler Views report.
9. Theme optimisation
What it is: Theme optimisation involves reviewing and optimising your Drupal site's theme to ensure it’s efficiently rendering content and not contributing to performance bottlenecks.
How it impacts performance: An optimised theme can improve site performance by reducing server load, streamlining asset delivery and eliminating render-blocking resources.
Steps to implement:
Choose a lightweight, performance-oriented theme for your Drupal site with minimal markup, such as .
Run on key pages of your website for before and after performance numbers.
Review and implement Lighthouse’s analysis for CSS and JavaScript improvements.
Inline critical CSS/JS where possible for faster load times. Consider using the Critical CSS .
Optimise your theme's templates by removing unnecessary or unused code and spaces, minimising inline CSS and JavaScript, and simplifying markup where possible.
Ensure your theme uses Drupal's render pipeline and caching effectively.
Disable theme debugging features on production such as rebuilding the theme upon page load. Debug configuration can be added to development environments with the Configuration Split or similar configuration management methods.
Use client-side JavaScript form validation when possible rather than server-side form validation for better UX and less server requests. Consider using the Clientside module.
Analyse your JavaScript for performance .
Above: Screenshot of Lighthouse performance report with possible CSS and JavaScript improvements.
10. Monitoring and ongoing optimisation
What it is: Monitoring and ongoing optimisation involve regularly checking your Drupal site's logs and performance metrics and making improvements as needed to maintain optimal performance levels.
How it impacts performance: By continuously monitoring and optimising your site, you can identify and address performance issues before they become critical, ensuring a consistently fast and responsive user experience.
Steps to implement:
Determine your performance for your site and for key high-traffic pages.
Set up and use a combination of performance monitoring and reporting tools, such as Google , , New , , and Drupal’s Site , and Website Speed modules.
Regularly review website logs for errors/warnings and overly-verbose logging, and address them as quickly as possible. Make sure debug logging settings are not used on production. Logs should be reviewed at least weekly but daily is ideal.
Address 404 errors as soon as possible and use the Fast 404 for faster response times or the Search 404 for more user-friendly results. Installing and configuring the Link Checker can reduce the number of bad links added to content. Installing the Redirect can ensure redirects are added when content paths change.
Regularly review performance metrics, compare against your performance budget and identify areas that need improvement. Ideally, these should be reviewed at least monthly and issues added to your backlog based on priority.
Continuously implement performance optimisation techniques as part of your regular maintenance work, and track the impact of your changes on site performance.
Run performance load testing on a regular basis for key pages of your website using load testing such as Apache or .
Above: Screenshot of Drupal’s database log.
Above: Screenshot of the Site Audit Summary and Best practices report.
Above: Screenshot of the Site Audit Watchdog database logs report.
Part 4 — The importance of website performance
Website performance is a crucial aspect that significantly impacts user experience, engagement, conversion rates and search engine rankings. Optimising your Drupal site's performance is essential to provide a seamless and efficient browsing experience for your users.
Using the 10 ways to improve performance from this article, you can tackle performance issues systematically and efficiently.
Remember that optimising your site's performance is not a one-time activity; it requires ongoing monitoring and adjustments to maintain the best possible user experience. Regularly review performance metrics, address areas that need improvement and continuously refine your optimisation efforts.
Part 5 — Our contribution to helping drive better performance
In this section, we share our own experiences and case studies on how we've contributed to improving performance for our clients and the Drupal community. We've divided this section into 3 subsections to provide an easy-to-follow structure and to highlight our expertise in each area:
- Case studies that focus on improving performance
- Drupal community contribution
- New audit tool: Drupal360
1. Case studies that focus on improving website performance
We’ve worked with two whole-of-government programs to help them improve their platforms’ performances. This has driven improved performance on 400+ websites on the two platforms. You can view the relevant case studies below:
- GovCMS — optimising hosting infrastructure clusters for improved performance
- GovCMS — managing increased website demand during COVID-19
- SDP — optimising hosting infrastructure clusters for improved performance
- SDP — managing unprecedented website demands during Covid-19
2. Drupal community contribution: purge modules
Our team has developed two performance-related modules:
GovCMS Akamai Purge : Helps integrate Drupal websites with the GovCMS-provided Akamai service.
Section purger : Allows ’s global, distributed caching layer to quickly respond to invalidation events from a Drupal instance in exactly the same way that Drupal’s internal cache or a local varnish cache running on the host machine does, ensuring that the content in Section’s global caching layer is always up to date.
3. New audit tool: Drupal360.io
As part of our commitment to Drupal, we're currently developing an audit tool, Drupal360.io, for site owners to assess their website's performance and other crucial metrics. Drupal360.io provides actionable insights and helps make informed decisions on performance-related improvements. This valuable resource is our contribution to the Drupal community and helps promote optimal website performance.
By sharing our experience, knowledge, and tools, we strive to contribute to the ongoing improvement of performance across Drupal sites and support the growth and success of the Drupal community.
Part 6 — How we can help you with Drupal performance
As a dedicated Drupal agency, we offer a range of Drupal performance services to help clients improve their website's performance. We've broken down our services into 3 main categories, each tailored to address specific performance concerns and help you maintain a highly performing Drupal website:
- Salsa support
- Drupal performance audits
- Salsa Hosting
1. Salsa support
Use Salsa's Drupal support for regular performance scans, fixes and optimisations.
2. Drupal performance audits
Evaluating your Drupal website's performance and identifying issues and opportunities.
3. Salsa Hosting
Performance optimisation features as standard, making your site 20x faster.