Book Image

Drush User's Guide

By : Juan Pablo Novillo Requena
Book Image

Drush User's Guide

By: Juan Pablo Novillo Requena

Overview of this book

<p>Drush is a command line interface for Drupal. Most of the tasks for building and maintaining a website are repetitive and involve filling in forms on administration pages. The majority of these tasks can be achieved with a single Drush command, shortening the development and maintenance time of a project drastically.</p> <p><em>Drush User's Guide</em> will allow you to be more productive and efficient in building and maintaining your Drupal sites through the command line. You will learn to install Drush on different platforms, and manage and configure your Drupal site by learning how to use and create Drush commands.</p> <p>Become a Drush expert by exploring its command toolkit; customizing it to suit your needs, and extending it with contributed modules.</p> <p>The command line will allow you to download, enable and upgrade Drupal projects in seconds. Back up your files, code and data in one single file, clear the cache, interact with databases, and deploy sites to remote machines - all using simply the command line. Use Drush with your own commands or alter existing ones; and extend the toolkit with a long list of contributed modules.</p> <p><em>Drush User's Guide</em> has everything you need to extend your use of the command line to easily build and manage your Drupal sites.</p>
Table of Contents (10 chapters)

Clearing out cached data and image styles (cache-clear and image-flush)


Drupal's cache and image styles are very frequently recreated in the early stages of a project. On one hand, new menu entries are added, blocks are removed, and features are reverted among others. On the other, image styles are created and then modified several times so the images that use them suit new design requirements. These two can be cleared out with simple and very similar commands.

Flushing the cache

Clearing out the cache is one of the most common tasks in a Drupal site. Drupal has a few cache tables which share the same structure and are used to store data of a particular nature. Drush comes with a handy command for clearing out these tables: cache-clear. Without arguments, it prompts with the list of available cache types that can be cleared out:

$ cd /home/juampy/projects/drupal
$ drush cache-clear
Enter a number to choose which cache to clear.
[0] : Cancel
[1] : all
[2] : theme registry
[3] : menu
[4]...