Tips to Improve Drupal Websites Performance

Drupal wesbite?? Want to improve Performance?? Here are the few tips:

1. Always keep the Drupal core and the contributed modules used in your application updated. Many a times, the updates include performance improvement.

2. Disable the statistics module which writes to database on every hit. You may not need this module if you are using Google Analytics.

3. Consider disabling modules like Administration Menu, Database Logging or Overlay which take a heavy load on performance. If your site does not require per field permissions, you can also consider disabling CCK Content Permissions module.

4. If you are using Views module, use caching of Views Instances so that a cached copy is used instead of rebuilding the view every time. You can choose to use time-based caching or update the view when its constituent element is updated.

5. Instead of using default Drupal site caching, use Memcache, File Cache or Redis (a key-value store)

6. In comparison to the platforms using Object Oriented Programming, Drupal 7 or older codebase loads a significant number of queries and files with each page load which can cause performance issue. Any page load where the query count is more than 500 should be relooked at for optimization.

7. Turn on aggregation and enable compression which can instantly improve the site performance.

8. Pay special attention to configure cron file which takes care of running scheduled jobs, search indexer, log clearing or temporary file clearing.

9. Disable the rebuilding of theme registry using the option “Rebuild theme registry on every page” under Administer > Appearance > Configure

10. Before removing any module, make sure that you disable it.

11. In robots.txt file, set up a reasonable delay between each crawl by bots, crawlers and spiders.

12. Use “HTTP acceleration” or “reverse proxy caching” using Varnish, Varnish HTTP Accelerator Integration or Cache Expiration.

13. Optimize various components used in the application –

For example:

Use Fast 404 to provide a quick reaction to page-not-found errors
Cache entities with Entity Cache and cache entity view modes with Display Cache.
Load images only when needed – Use Image Lazyloader or other such modules.
14. On the Production server, disable the Update Manager module. Enable it on the Development server after synchronizing the Development server with Production.

15. Check the watchdog logs and fix any PHP warnings or notices you see.

16. If you are using a shared server, offload static files, images and videos to a CDN (content delivery network).

17. Use the power of cache_set and cache_get function to cache the results of custom query.

18. Submit your site to the W3C validator. A valid HTML page is rendered faster than one with validation errors. Tweak the WYSIWYG editor settings to avoid validation errors or change the doctype in the theme’s page.tpl.php from XHMTL Strict or Transitional to HTML 4.01.

19. GZip components using following code to the drupal/.htaccess file: AddOutputFilterByType DEFLATE text/* application/javascript application/x-javascript application/rss+xml application/xml

20. Opt for the Drupal specific hosting infrastructure like Pantheon, Acquia Cloud or #AberdeenCloud.

Go ahead and improve the performance your site. and yes keep sharing :)