Set Javascript and CSS aggregation with Drush

You can very quickly set Javascript and CSS aggregation on a Drupal site with Drush. The settings are stored as a Drupal variable, so you use the drush vset (vset is an alias for variable-set) command.

The name of the variable for Javacript aggregation is preprocess_js.
The name of the variable for CSS aggregation is preprocess_css.

Enable CSS and Javascript aggregration
drush vset preprocess_css 1
drush vset preprocess_js 1

Disable CSS and Javascript aggregration
drush vset preprocess_css 0
drush vset preprocess_js 0

Add new comment

Plain text

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.