# How to Deploy Drupal 7 [Source](/recipe/drupal7.php) ## How to deploy a Drupal 7 project with zero downtime? - First, [install](/docs/installation.md) the Deployer. - Second, require `recipe/drupal7.php` recipe into your _deploy.php_ or _deploy.yaml_ file. - Third, now you can have a zero downtime deployment! Did you know that you can deploy **Drupal 7** project with a single command? Just run `dep deploy`. Something went wrong? Just run `dep rollback` to rollback your changes. Also, you can take an advantages of the [Deployer's CLI](/docs/cli.md) to deploy your project. Another cool feature of the Deployer is [provisioning](/docs/recipe/provision.md). Take any server, and run `dep provision` command. This command will configure webserver, databases, php, https, and more. You will get everything you need to run your **Drupal 7** application. Deployer does next steps to [deploy](#deploy) **Drupal 7**: * Displays info about deployment * Prepares host for deploy * Locks deploy * Prepares release * Updates code * Creates symlinks for shared files and dirs * Makes writable dirs * Creates symlink to release * Unlocks deploy * Cleanup old releases The drupal7 recipe is based on the [common](/docs/recipe/common.md) recipe. ## Configuration ### drupal_site [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L14) Set Drupal 7 site. Change if you use different site ```php title="Default value" 'default' ``` ### shared_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L17) Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. Drupal 7 shared dirs ```php title="Default value" [ 'sites/{{drupal_site}}/files', ] ``` ### shared_files [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L22) Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. Drupal 7 shared files ```php title="Default value" [ 'sites/{{drupal_site}}/settings.php', ] ``` ### writable_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L27) Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. Drupal 7 writable dirs ```php title="Default value" [ 'sites/{{drupal_site}}/files', ] ``` ## Tasks ### deploy [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L8) This task is group task which contains next tasks: * [deploy:prepare](/docs/recipe/common.md#deployprepare) * [deploy:publish](/docs/recipe/common.md#deploypublish) ### drupal:settings [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L33) Create and upload Drupal 7 settings.php using values from secrets ### drupal:upload_files [Source](https://github.com/deployphp/deployer/blob/master/recipe/drupal7.php#L75) Upload Drupal 7 files folder