Showing posts with label drupal. Show all posts
Showing posts with label drupal. Show all posts

Drush commands to enable/disable performance options in Drupal 7

Drush commands to enable/disable performance and cache related options in Drupal 7

The script presented in this post adds two new drush commands: cache-enable and cache-disable which gives us a handy way to disable / enable performance and cache related configuration parameters and options. These parameters can be found in the admin/config/development/performance section of a Drupal 7 installation.

The cache-enable actually performs all the following actions:
  1. Enables the "Cache pages for anonymous users" option
  2. Enables the "Cache blocks" option
  3. Sets the "Minimum cache lifetime" option to the required value. Defaults to 1 minute
  4. Sets the "Expiration of cached pages" option to the required value. Defaults to 1 hour 
  5. Enables the "Aggregate and compress CSS files" option
  6. Enables the "Aggregate JavaScript files" option 
  7. Finally clears all caches (same as pressing the "Clear All Caches" button)

Drupal 7 minor version upgrade

Steps for upgrading 7.x version of Drupal to any later 7.x version

Preupgrade steps

  1. Make a full backup of all files, directories, and your database(s) before starting, and save it outside your Drupal installation directory. Instructions may be found at http://drupal.org/upgrade/backing-up-the-db
  2. It is wise to try an update or upgrade on a test copy of your site before applying it to your live site. Even minor updates can cause your site's behavior to change.