Drush

Disable All Cache on Drupal 8

Open settings.php add these lines:

$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$settings['cache']['bins']['render'] = 'cache.backend.null';

Use drush with command drush cr to clear all cache

 

Installing Drush on Mac using Homebrew

  1. Install Homebrew with command:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Use Homebrew install drush with commands
    brew tap homebrew/dupes
    brew tap homebrew/versions
    brew tap homebrew/php
    brew install php55
    brew install composer
    brew install drush
     

Update Drupal core with Drush

Update Drupal core with Drush

Tips update Drupal core with Drush:

  1. Make sure you enabled "Update manager" module otherwise enable it with Drush by command: drush en update
  2. Always backup your site and database before update Drupal core.
  3. Run Drush command to update Drupal core: drush up drupal

Fix Drush fail download dev module on Windows

In drush/commands/pm/package_handler/wget,inc

// Add to URL so it is part of the cache key . Dev snapshots can then be cached forever. 
if (strpos($release['download_link'], '-dev') !== FALSE) { 
   $release['download_link'] .= '?date=' . $release['date']; 
} 
$filename = basename($release['download_link']);

should probably be replaced with this: