Skip to content

Instantly share code, notes, and snippets.

@teknikqa
Last active July 17, 2016 08:34
Show Gist options
  • Select an option

  • Save teknikqa/50eba478e9d0b426bf2432e879077171 to your computer and use it in GitHub Desktop.

Select an option

Save teknikqa/50eba478e9d0b426bf2432e879077171 to your computer and use it in GitHub Desktop.
Clear all caches in Drupal using SQL
#!/usr/bin/env bash
# Clear cache of the following tables using the Drush SQL command
# The SQL commands can also be used directly in MySQL
drush sql-cli
TRUNCATE TABLE cache;
TRUNCATE TABLE cache_block;
TRUNCATE TABLE cache_bootstrap;
TRUNCATE TABLE cache_field;
TRUNCATE TABLE cache_filter;
TRUNCATE TABLE cache_form;
TRUNCATE TABLE cache_image;
TRUNCATE TABLE cache_menu;
TRUNCATE TABLE cache_page;
TRUNCATE TABLE cache_path;
TRUNCATE TABLE cache_token;
TRUNCATE TABLE cache_update;
drush cc all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment