# Using Drush for your Drupal site

> Learn the most useful Drush commands for managing your Drupal site, such as clearing caches and running updates, and how to get Drush.

Source: https://helpcenter.ruachost.com/apps/drupal/using-drush-for-your-drupal-site/

**Drush** is a command‑line shell and scripting interface for Drupal. It allows administrators and developers to manage Drupal sites more efficiently by automating tasks that would otherwise require multiple clicks in the web interface. On **ruachost.com**, Drush is supported on Managed VPS accounts. [Contact Ruachost support](https://dashboard.ruachost.com/submitticket.php) to check availability on shared hosting.

## Why Use Drush?

- Speeds up routine site administration.
- Automates updates, backups, and cache clearing.
- Provides powerful tools for developers.
- Reduces reliance on the Drupal web interface.

## Common Drush Commands

| Command | Purpose |
| --- | --- |
| `drush status` | Displays site information (Drupal version, database, PHP). |
| `drush cache-rebuild` | Clears and rebuilds all caches. |
| `drush up` | Updates Drupal core and contributed modules. |
| `drush user-password admin --password="newpass"` | Resets the administrator password. |
| `drush sql-dump` | Exports the database for backup. |
| `drush cron` | Runs Drupal’s cron routine manually. |
| `drush en modulename` | Enables a module. |
| `drush pm-uninstall modulename` | Uninstalls a module. |

## Installing Drush

1. Connect to your server via **SSH**.
2. Navigate to your Drupal installation directory.
3. Install Drush using Composer:

   ```bash
   composer require drush/drush
   ```
4. Verify installation:

   ```bash
   drush --version
   ```

## Important Notes

- Drush requires **Composer** and **SSH access**.
- Always back up your site before running update or uninstall commands.
- Use Drush aliases to manage multiple sites more efficiently.
