8 tips for a faster Drupal website
As with other Content Management Systems, the speed at which your Drupal website loads depends on different factors that you can actually control. But what exactly should you consider? Thanks to these 8 handy tips, you too will have a faster and more efficient Drupal website!
Does you Drupal website load at a snail’s pace? These 8 tips provided by Combell will give your website wings!
A fast Drupal website will be prioritised
Drupal is an open source CMS that, according to recent figures published by W3CTech, is used by 2.2% of all websites worldwide. And it is used by 4.8% of all the CMS-based websites. Among famous websites that use Drupal are The Economist, Warner Brothers Records, as well as many others.
With such a CMS, a page is generated on the fly (using content from the database) when a visitor lands on it. However, different factors can have a negative influence on how the generated page is displayed. How can you know if your site loads fast? Find out using:
- Google’s PageSpeed Insights: find problematic pages and analyse them
- Webpagetest.org: get a full report on your CSS files, images and links
- Pingdom: discover the elements that slow down your website and get instant tips to resolve issues
Your website speed has a big influence on your traffic, conversions, and earnings. Remember that, according to Dynatrace, saving half a second can make a 10% difference in sales on your website. A fast Drupal website is also good for your SEO, as load speed is a factor that search engines take into account when it comes to search rankings for your site. According to Google, websites lose 20% of their traffic for every extra 100 milliseconds a page needs to load.
But how can you make your Drupal website faster?
1. Make sure your Drupal website always uses the latest version
Updates usually contain bug fixes and improve performance. Make sure that the core, the modules and the themes are always up to date.
In order to perform updates, go to Reports > Available Updates. Then, click on Check Manually to check for updates.
Tip: Make sure you also turn on your Automatic patching feature with Combell. This way, your files (scripts, PHP files, etc.) will be checked for malware and vulnerabilities and, if you want, they can be automatically fixed via an update. (You can also read: “Combell’s Automatic Patching protects your website at all times”)
2. Optimise the images on your Drupal website
On average, images account for 56% of the weight of a web page. Optimising these images will thus significantly increase speed. Try this:
- Adjust the compression ratio (Drupal 6 and 7 use a default compression of 75%): go to Configuration > Image toolkit, adjust the percentage, and click on Save Configuration
- Use image optimization modules, such as Image Optimize and Image Magick
- Use the Lazy Load Images technique, thanks to which images are loaded only when visible in the browser window. The most popular module for this purpose is Image LazyLoader
- Scale your images before uploading them; do not let CSS handle this task. The Image Resize Filter module will help you do this.
3. Disabling unnecessary modules will make your Drupal website faster
As with all other CMS platforms, every default installation includes modules that you do not need. Disabling those modules will make your website faster. Experts recommend that you execute a maximum of 50 modules. Here are some modules you can disable:
- Statistics: this module writes to your database every time the page is loaded. If you use Google Analytics, you do not need this module.
- Administration development tools: only necessary if you want to create extra tools by yourself
- Other modules, depending on your needs: Devel, Devel node access, Field UI, Rules UI, Views UI, Module Filter, Blog, Forum, Taxonomy, Search, Help, Shortcut, Dashboard, Database Logging, Color, Toolbar and Tracker
4. Do you have a Drupal website with an international audience? Use a CDN!
Popular services include Cloudflare, which is free, and Akamai Technologies, which is a paying solution (see also the comprehensive list of CDNs on Wikipedia)
5. Optimise the MySQL and PHP of your Drupal website
Keep a clean MySQL database and delete unnecessary content. For concrete tips and scripts, please visit Drupal: Optimizing MySQL. For most of your tables, insiders advise to use InnoDB rather than MyISAM.
Tip: Make sure you always use the latest version of PHP, which is faster than the previous versions.
6. Run the cron jobs on your Drupal website at off-peak times
Cron jobs – tasks planned to be executed automatically at regular intervals – can dramatically slow down the operation of your Drupal website. Therefore, it is best to schedule tasks that need to be executed only once a day at off-peak times. Good examples include checking for updates of themes or modules, sending newsletters, etc.
7. Pick the right hosting for your Drupal website
Price should not be your main concern when choosing hosting for your Drupal website. Cheap but slow hosting can indeed cost you more than you bargained for! Go for fast SSD hosting, such as that provided by Combell.
Also, check the extras provided by the hosting provider.
- Does it only offer web space, or also advice provided by Drupal experts and a ready-to-use Drupal installation?
- What about SLAs? Which guarantees for uptime do you get?
- Is 24/7 support available in your language?
- Are there advanced optimisation tools for Drupal such as Memcache, Varnish or Reddit?
- Can you use free Let’s Encrypt SSL certificates that allow you to offer secure HTTPS pages?
- Is HTTP/2 enabled? Because this new version of the HTTP protocol also influences your speed!
If your current hosting is substandard, and if you are interested in the Drupal hosting services provided by Combell, feel free to use the free transfer service that “packs” your website and neatly transfers it to its new address.
8. The most important tip to make your Drupal website faster: use a cache
With a website based on a content management system, you can ask yourself if it is really necessary that absolutely all the content is retrieved from the database every time a user visits a page… Certain parts of the content have indeed remained unchanged over a certain period of time and could thus simply be served from a cache. This could give your website a huge boost in speed!
Drupal allows you to use a cache at different levels; the tools for this are already built into Drupal itself but are turned off by default. You can choose from Page caching, Views Caching, Panel Caching, PHP caching, Browser Caching, Gzip Compression and Expire Headers. For detailed instructions on how to turn on these tools, please visit Keycdn.com.
However, you can also use dedicated tools, such as Varnish and Redis. Read more about these tools in the following articles:
For further tips to make your website faster, please refer to our (Dutch) e-book “Myths on speed and what really works to make your site faster” (downloadable for free)
So, do not wait any longer to give your Drupal website a boost! Also, check what Combell’s Drupal hosting offers you.
Tip: Are you still unsure which CMS to choose? The article “Which CMS should you choose for your website: WordPress, Joomla or Drupal?” will help you get started.