Drupal · Drupal 6 & Drupal 7 · Drush · Linux

Drush Specific Database Comands with Drush Aliases

I was looking for a way to clear cache on specific sites as I have a a Drupal Multi-Site setup that has more than one database. Sometimes I only want to clear cache on one database at a time.

Since it took longer than 5 minutes : ) to find advice on this subject, I am posting here in hopes that it will help.

There is a little up-front set up involved but it is worth it when you have a setup with multiple databases.

Drush aliases are a powerful tool to get to know. With Drush aliases, it is possible to run commands on a remote server from your local server. Pretty awesome if you like to save time.

Here is an example for setting up drush aliases:

CSS · Drupal · Drupal 6 & Drupal 7 · Drush · Web Design

drush cc Not Showing All Options (only showing 2 options cancel and drush)

Trying to clear your Drupal site chache with drusch cc or drush cc all?
Drush should out put a list in response that looks like this:

But instead, you may see something that looks like this:

Chances are you are not in the document root of the Drupal site on which you are trying to clear the cache.