Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How can you help your Drupal website continue to perform at the highest level as it grows to meet demand? This comprehensive guide provides best practices, examples, and in-depth explanations for solving several performance and scalability issues. You’ll learn how to apply coding and infrastructure techniques to Drupal internals, application performance, databases, web servers, and performance analysis.
Covering Drupal versions 7 and 8, this book is the ideal reference for everything from site deployment to implementing specific technologies such as Varnish, memcache, or Solr. If you have a basic understanding of Drupal and the Linux-Apache-MySQL-PHP (LAMP) stack, you’re ready to get started.
Establish a performance baseline and define goals for improvement
Optimize your website’s code and front-end performance
Get best and worst practices for customizing Drupal core functionality
Apply infrastructure design techniques to launch or expand a site
Use tools to configure, monitor, and optimize MySQL performance
Employ alternative storage and backend search options as your site grows
Tune your web servers through httpd and PHP configuration
Monitor services and perform load tests to catch problems before they become critical
Display Suite can override the way that Drupal's (and Apache solr's) default search results are being displayed. This will be useful if you wanted to include images or file attachments in search results.
Modify schema.xml so that it supports geo location values
WHAT/WHERE search (radius based) - instead of a single keyword based search
Content-type based filtration
Implementation of hook_apachesolr_index_document_build, hook_apachesolr_query_alter
I am not going through the steps for installing / connecting solr with drupal. A lot of articles are already available online.
Case
Typically for job/property search sites, where you have two text fields: WHAT and WHERE. I am using the apachesolr search pages for this implementation.
Example search:
WHAT: drupal architect
WHERE: Mumbai, Maharashtra, India
(basically, the 'where' is an autofill textbox - which gets data from YQL - and its cached when search is being repeated)
This page will describe how to install ApacheSolr and connect it to SearchAPI, using Views to deliver Solr content.
Installing ApacheSolr (OSX/Linux)
Installing & Configuring SearchAPI
Randomly Sorting Listings with Solr and Views
Some views may need to be randomly sorted, like when you're showing off a random listing in a sidebar of a theme. To do that, you will need the patches found here: