# How to Deploy a Magento Project ```php require 'recipe/magento.php'; ``` [Source](/recipe/magento.php) Deployer is a free and open source deployment tool written in PHP. It helps you to deploy your Magento application to a server. It is very easy to use and has a lot of features. Three main features of Deployer are: - **Provisioning** - provision your server for you. - **Zero downtime deployment** - deploy your application without a downtime. - **Rollbacks** - rollback your application to a previous version, if something goes wrong. Additionally, Deployer has a lot of other features, like: - **Easy to use** - Deployer is very easy to use. It has a simple and intuitive syntax. - **Fast** - Deployer is very fast. It uses parallel connections to deploy your application. - **Secure** - Deployer uses SSH to connect to your server. - **Supports all major PHP frameworks** - Deployer supports all major PHP frameworks. You can read more about Deployer in [Getting Started](/docs/getting-started.md). The [deploy](#deploy) task of **Magento** consists of: * [deploy:prepare](/docs/recipe/common.md#deployprepare) – Prepares a new release * [deploy:info](/docs/recipe/typo3.md#deployinfo) – * [deploy:setup](/docs/recipe/deploy/setup.md#deploysetup) – Prepares host for deploy * [deploy:lock](/docs/recipe/deploy/lock.md#deploylock) – Locks deploy * [deploy:release](/docs/recipe/deploy/release.md#deployrelease) – Prepares release * [deploy:update_code](/docs/recipe/typo3.md#deployupdate_code) – * [deploy:shared](/docs/recipe/deploy/shared.md#deployshared) – Creates symlinks for shared files and dirs * [deploy:writable](/docs/recipe/deploy/writable.md#deploywritable) – Makes writable dirs * [deploy:cache:clear](/docs/recipe/magento.md#deploycacheclear) – Clears cache * [deploy:publish](/docs/recipe/common.md#deploypublish) – Publishes the release * [deploy:symlink](/docs/recipe/deploy/symlink.md#deploysymlink) – Creates symlink to release * [deploy:unlock](/docs/recipe/deploy/lock.md#deployunlock) – Unlocks deploy * [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploycleanup) – Cleanup old releases * [deploy:success](/docs/recipe/common.md#deploysuccess) – The magento recipe is based on the [common](/docs/recipe/common.md) recipe. ## Configuration ### shared_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L13) Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. Magento shared dirs ```php title="Default value" ['var', 'media'] ``` ### shared_files [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L16) Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. Magento shared files ```php title="Default value" ['app/etc/local.xml'] ``` ### writable_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L19) Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. Magento writable dirs ```php title="Default value" ['var', 'media'] ``` ## Tasks ### deploy:cache:clear [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L25) Clears cache. Clear cache ### deploy:clear_version [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L32) Remove files that can be used to compromise Magento ### deploy [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento.php#L46) Deploys your project. Main task This task is group task which contains next tasks: * [deploy:prepare](/docs/recipe/common.md#deployprepare) * [deploy:cache:clear](/docs/recipe/magento.md#deploycacheclear) * [deploy:publish](/docs/recipe/common.md#deploypublish)