# magento2 [Source](/recipe/magento2.php) * Requires * [common](/docs/recipe/common.md) ## Configuration ### static_content_locales [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L20) By default setup:static-content:deploy uses `en_US`. To change that, simply put `set('static_content_locales', 'en_US de_DE');` in you deployer script. ```php title="Default value" 'en_US' ``` ### content_version [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L22) ### shared_files [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L26) Overrides [shared_files](/docs/recipe/common.md#shared_files) from `recipe/common.php`. ```php title="Default value" [ 'app/etc/env.php', 'var/.maintenance.ip', ] ``` ### shared_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L30) Overrides [shared_dirs](/docs/recipe/common.md#shared_dirs) from `recipe/common.php`. ```php title="Default value" [ 'var/composer_home', 'var/log', 'var/export', 'var/report', 'var/import', 'var/import_history', 'var/session', 'var/importexport', 'var/backups', 'var/tmp', 'pub/sitemap', 'pub/media' ] ``` ### writable_dirs [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L44) Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. ```php title="Default value" [ 'var', 'pub/static', 'pub/media', 'generated' ] ``` ### clear_paths [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L50) Overrides [clear_paths](/docs/recipe/common.md#clear_paths) from `recipe/common.php`. ```php title="Default value" [ 'generated/*', 'pub/static/_cache/*', 'var/generation/*', 'var/cache/*', 'var/page_cache/*', 'var/view_preprocessed/*' ] ``` ### magento_version [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L59) ### maintenance_mode_status_active [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L66) ## Tasks ### magento:compile [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L74) Compile magento di. Tasks ### magento:deploy:assets [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L81) Deploy assets. ### magento:sync:content_version [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L86) Sync content version. ### magento:maintenance:enable [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L96) Enable maintenance mode. ### magento:maintenance:disable [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L101) Disable maintenance mode. ### magento:config:import [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L106) Config Import. ### magento:upgrade:db [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L141) Upgrade magento database. ### magento:cache:flush [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L168) Flush Magento Cache. ### deploy:magento [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L173) Magento2 deployment operations. This task is group task which contains next tasks: * [magento:compile](/docs/recipe/magento2.md#magentocompile) * [magento:deploy:assets](/docs/recipe/magento2.md#magentodeployassets) * [magento:config:import](/docs/recipe/magento2.md#magentoconfigimport) * [magento:upgrade:db](/docs/recipe/magento2.md#magentoupgradedb) ### deploy [Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L182) Deploy your project. 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:clear_paths](/docs/recipe/deploy/clear_paths.md#deployclear_paths) * [deploy:magento](/docs/recipe/magento2.md#deploymagento) * [deploy:publish](/docs/recipe/common.md#deploypublish)