# How to Deploy Yii [Source](/recipe/yii.php) ## How to deploy a Yii project with zero downtime? - First, [install](/docs/installation.md) the Deployer. - Second, require `recipe/yii.php` recipe into your _deploy.php_ or _deploy.yaml_ file. - Third, and now you can have a zero downtime deployment! Did you know that you can deploy **Yii** 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 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 **Yii** project. The yii recipe is based on the [common](/docs/recipe/common.md) recipe. ## Configuration ### shared_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L9) Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. Yii shared dirs ```php title="Default value" ['runtime'] ``` ### writable_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L12) Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. Yii writable dirs ```php title="Default value" ['runtime'] ``` ## Tasks ### deploy [Source](https://github.com/deployphp/deployer/blob/master/recipe/yii.php#L18) Deploys your project. Main task This task is group task which contains next tasks: * [deploy:prepare](/docs/recipe/common.md#deployprepare) * [deploy:vendors](/docs/recipe/deploy/vendors.md#deployvendors) * [deploy:publish](/docs/recipe/common.md#deploypublish)