Backend / DevOps / Architect
Brit by birth,
located worldwide

All content © Alex Shepherd 2008-2024
unless otherwise noted

Drupal - Reset CSS & JS cache with Drush

Published
1 min read
image
Image Credit: Unknown (if this is your work, reach out to me and I'll credit you!)

Hi folks,

I've been theming a lot of Drupal instances recently, and have found that the CSS and JS caches can be a real pain to clear every time you want to make an update. In my frustrations, I turned to Google, and found the following little gem.

To turn off CSS caching, use the following drush command:

drush vset preprocess_css 0 --yes

This can be done for JS as follows:

drush vset preprocess_js 0 --yes

The last thing you may want to do is clear the current CSS/JS cache. For that, the following command will suffice:

drush cc css+js

Useful stuff! Saves fannying about trekking through menus, as Drupal is wont to force.

SOURCE: OPC IT