Now a day, performance of any website is the main concern. There are lots of things that a developer can do to increase performance or speed of a Drupal Website.Here we are going to write some of the most important tips to speed up the performance of your Drupal website.
First of all we need to do some preparation to develop a Drupal Website. There are lots of modules that we will use in our website. So prepare a list of functionality that we need to implement and also try to list out the modules to accomplish those functionalities. This practice will help us to avoid the use of unnecessary modules.
Drupal community often releases updates for Drupal core and its contributed modules. Sometimes these updates include performance improvements. So keeping those modules up to date is necessary. First try available updates on development environment, only after that apply them to the production environment. so that there will be no breakage in application due to these updates.
- DISABLE RE-BUILDING OF THEME REGISTRY
In Drupal there is an option in Appearance section “Rebuild theme registry on every page”, disable this option while our website is on live environment. When enabling this feature, Drupal will force to rebuild the entire theme registry on each page load and that would cause a slow down on our production environment.
- SETUP APC (ALTERNATIVE PHP CACHE)
APC is an open opcode cache for PHP. This module is useful for optimizing PHP intermediate code. Many Drupal specific hosting companies already have setup this feature and already running on their server so we may even be using it without noticing.
- ENABLE CACHE
Developer must enable page and block cache. When its enabled, Drupal will render the entire page once and will save the output in database.
- DISABLE/UNINSTALL UNUSED MODULES
Drupal uses modular strategy and there are lots of modules in Drupal Website. So we need to disable un-necessary modules or we can also uninstall those modules if there are no longer in use.
- DISABLE DATABASE LOGGIN MODULE
This module writes all the logs to database. Due to this, it puts extra load on database server and causes slow down. So disable this module and instead of this we can also use syslog module.
- SCHEDULE CRON JOBS
Configure cron to run. Drupal cron also perform some of the maintenance task like deletion of temporary files and clearing logs.
- USEFUL MODULES
Here are some of the useful modules that we can use to improve Drupal performance
How To Use Twig In Drupal 8