To help you prepare to launch your new Drupal website and to avoid several common configuration or performance issues, use the suggestions, recommended settings, and information as a prelaunch checklist for your website. Unless otherwise specified, these suggestions apply to all versions of Drupal.
Install and enable recommended modules
Drupal websites usually require that you install contributed modules to be able to accomplish all of their necessary functions. Here are some recommendations and potential problems to be aware of as you develop your website if you intend to migrate the website to Cloud Platform.
Although none of these modules are required for your website to work with Cloud Platform, we recommend that you install and use these modules with your Cloud Platform-hosted websites to enhance performance and to help you more easily diagnose website issues.
Install and enable the following modules based on your needs and your version of Drupal:
Module | Description | Drupal 7 | Current Drupal version |
---|---|---|---|
Acquia Purge | Gives you significant control over your caches and is designed with Cloud Platform websites in mind. It can help you purge down to the individual node level, which can ensure that new or changed content shows up immediately instead of waiting for the cache to refresh. | ✓ | ✓ |
Acquia Search modules | Enables your website to integrate with Acquia Search. Depending on your configuration, additional modules are required or recommended. | ✓ | ✓ |
Cookie Cache Bypass Advanced | Allows you to set cache lifetimes on particular cookies. | ✓ | 𐄂 |
Fast 404 | Reduces the level of bootstrap required to serve error pages for requested, nonexistent static assets. | ✓ | ✓ |
Redirect | Reduces your reliance on path redirects in the .htaccess file . Path redirects need to be loaded at run time for every page request, and having too many redirects can cause website performance problems. | ✓ | ✓ |
Security Kit | Implements a number of protections against serious security issues, such as cross-site scripting and forgeries. | ✓ | ✓ |
Syslog core module | Stores logs much faster than the Database logging core module. | ✓ | ✓ |
Transliteration | Converts special characters in filenames to ASCII. | ✓ | ✓ |
Views Litepager | Increases your website’s performance on paginated queries against large datasets. | ✓ | 𐄂 |
Uninstall and remove incompatible modules
Disable and uninstall the following modules or classes of modules:
- Boost - This module conflicts with Varnish® caching, and is not needed in Cloud Platform.
- Database logging core module - The Syslog core module can store logs much faster, because it does not need to write to the database.
- PHP Filter core module - Incorrect use of this module can cause security problems for your website.
- Infrastructure-side statistics modules - Instead, use client-side statistics services, such as Google Analytics or Omniture.
- Remove unneeded modules - Remove modules such as Devel and
views_ui
(part of the Views module), which are not needed on a production website, to reduce your website’s startup (bootstrap) overhead.
Configure performance settings in Drupal
On the Performance page (URL info), configure or enable the following values:
- Enable page caching for anonymous website visitors.
- Current Drupal version: Do this by default.
- Drupal 7: Caching section > Cache pages for anonymous users checkbox
- Ensure that block caching is enabled.
- Current Drupal version: The current Drupal version handles block caching in the Cache API.
- Drupal 7: Caching section > Cache blocks checkbox
- In the Caching section > Minimum cache lifetime list, set the amount of time that cached pages won’t be re-created to
none
. - In the Caching section > Expiration of cached pages list, set the maximum amount of time that an external cache can use an old version of a page to greater than or equal to five minutes (300 seconds).
- Enable CSS aggregation in the Bandwidth Optimization section > Aggregate and compress CSS files checkbox.
- Enable JavaScript aggregation in the Bandwidth Optimization section > Aggregate JavaScript files checkbox.
- For the Views and Panels modules, check the views content caches, time-based caches, and panels caches.
Do not override the PHP memory limit on a global basis. Acquia tunes its infrastructure to use the exact number of threads possible for the memory available to your application, and overriding it on a global basis will lead to HTTP 5xx status codes for your website’s users. If your application needs more than 128MB of memory for each page request, create a Support ticket to request your memory allocation be altered to provide fewer threads, but more memory per thread.
- Use the Acquia Search service, which removes search load from MySQL and offers feature and usability improvements.
Ensure that you’re using InnoDB as your website’s table engine. Although InnoDB is now the default for Drupal, you should confirm that you’re using it instead of the MyISAM table engine, which has performance problems. To examine your current database tables to determine if any other engines are in use, use the following SQL query (where
[db_name]
is your database’s name):SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '[db_name]' AND ENGINE <> 'InnoDB';
If you need to convert tables in your database to InnoDB, use
this script
after you modify it with your own credentials and database information.
Disable page compression
Having the Compress cached pages option enabled can result in Varnish double-compressing page contents. When already-compressed text is compressed again, your website will display characters from the compressed file, rather than the expected website content. We recommend you do the following:
- Disable Compress cached pages in the Bandwidth Optimization section > Aggregate and compress CSS files checkbox.
Cache your website with Varnish
Cloud Platform uses Varnish in front of all of its websites to help ensure responsiveness. Learn more about Varnish. As part of setting up your website on Cloud Platform, you may need to bypass the Varnish cache, set redirects, or purge it entirely.
Configure Memcached
Memcached is a general-purpose memory cache infrastructure daemon. It can improve Drupal application performance by moving Drupal’s standard caches out of the database and by caching the results of other expensive database operations. Learn more about Memcached.
Protect your website with SSL
Secure Socket Layer, or SSL, is of major importance to many websites, and critical for websites serving personal or financial information. The Enabling SSL documentation page provides an overview of how you can use SSL with Cloud Platform.
Shorten cutover time by lowering your TTL
Several days before DNS cutover, lower your DNS’s Time to Live (TTL) setting to 5–10 minutes. Doing so reduces the amount of time your DNS change will take to propagate when you are ready to turn your new website live, and help you shorten the time that web traffic and email are routed to both your old and new infrastructure. Once the cutover to your new website is complete, you can set your domain’s TTL back to its previous value. Since the method of lowering TTL can differ from provider to provider, you will need to contact your domain name (DNS) provider for specific instructions on how to lower your TTL.
Contact Acquia if you expect a high-traffic event
If you’re expecting an event that will send a significant amount of traffic to your website, we encourage you to contact Acquia Support in advance, so that we can help you prevent a website outage. Events that can cause enough traffic to affect your website’s availability include:
- Website launches
- Marketing campaigns
- Performances
For more information on exactly how to notify Acquia of an important event on your website, visit Expecting a high-traffic event.
Best practices
Acquia recommends the following best practices:
- Use HTTP authentication during development. HTTP authentication invalidates Varnish caching and should never be used on a production website. For more information, see Password-protecting non-production environments.
- Avoid putting all user files in a single directory. A directory with thousands of files needs more time to read files in the directory, causing serious performance problems that can affect your website’s availability. To restructure your files into subdirectories, see Proactively set your file fields to use paths.
Additional resources
The Acquia documentation and Support knowledge base includes several other articles that may be helpful to you as you configure your new Drupal website, including the following:
If you require additional assistance, Acquia provides additional services to Enterprise and Elite customers that include website installation and configuration.