Email - info@zymphonies.com

Clear or rebuild Drupal's cache

Make your Drupal websites faster using the Drupal cache. Enabling cache helps you to avoid slow down websites with a lot of traffic. Clearing the caches or rebuild caches after making any changes in the development. Change can be installing module/theme/library or modifying existing module/theme/library. Always it is good practice to clear or rebuild caches when you export the database.

There are many ways to clear the Drupal cache.

1 Clearing the cache from admin UI

Navigate to Administration > Configuration > Development > Performance (http://domian.com/admin/config/development/performance)
​Click the button "Clear all caches

2 Clearing the cache using Drush

Open a Terminal window and cd to your Drupal site root.
Drupal 8: Enter 'drush cache-rebuild'
​Drupal 7 and lower: Enter 'drush cache-clear all' or 'drush cc all'

3 Run update.php

Always set $update_free_access = TRUE; first in /sites/default/settings.php and run update.php (http://domian.com/update.php). Change back to FALSE after completing the updates.

4 Clearing the cache from database

Log into your PHPMyAdmin select your cache_ tables and TRUNCATE (empty, not remove).

Or, from the mysql CLI or a SQL command field in a database administrative tool (like PhpMyAdmin or others), you would run the following:

TRUNCATE cache_config;
TRUNCATE cache_container;
TRUNCATE cache_data;
TRUNCATE cache_default;
TRUNCATE cache_discovery;
TRUNCATE cache_dynamic_page_cache;
TRUNCATE cache_entity;
TRUNCATE cache_menu;
TRUNCATE cache_render;
TRUNCATE cache_toolbar;