PHPackages                             webgriffe/deployer-magento2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. webgriffe/deployer-magento2

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

webgriffe/deployer-magento2
===========================

Deployer recipe for Magento 2 project

610.5k1[1 issues](https://github.com/webgriffe/deployer-magento2/issues)PHP

Since May 17Pushed 5y ago3 watchersCompare

[ Source](https://github.com/webgriffe/deployer-magento2)[ Packagist](https://packagist.org/packages/webgriffe/deployer-magento2)[ RSS](/packages/webgriffe-deployer-magento2/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Magento 2 Deployer Recipe
=========================

[](#magento-2-deployer-recipe)

Deployer recipe for Magento 2 project. This adds some useful tasks for db and media operations and it overrides some

Install
-------

[](#install)

Install it using Composer:

```
$ composer require --dev webgriffe/deployer-magento2 dev-master

```

Usage
-----

[](#usage)

Require the recipe in your `deploy.php`:

```
namespace Deployer;

require __DIR__ . '/vendor/webgriffe/deployer-magento2/magento.php';

// ... usual Deployer configuration
```

This recipe overrides some tasks of the original Deployer Magento2 recipe:

- The tasks `deploy:magento` and `deploy` now do not enable and disable the maintenance page. Instead, if you want to do that you must use one of two new tasks `deploy:magento-maintenance` and `deploy-maintenance`.
- The task `magento:deploy:assets` now uses the `assets_locales` environment variable that you can define in your deploy.php file like this: ```
    set('assets_locales', 'en_GB en_US it_IT');
    ```
- The task `deploy:resetOPCache` called inside `deploy` and `deploy:maintenance` uses variable base\_url that you can define in your deploy.php file like this: ```
    server('staging', 'my.server.com')
        ->user('myUser')
        ->set('deploy_path', '/path/to/public_html')
        ->set('http_user', 'myUser')
        ->set('http_group', 'myGroup')
        ->set('base_url', 'http://myBaseUrl.com/')
        ->stage('staging');
    ```

It also adds the `magento:first-deploy` task which is useful when depoying a project for the first time (when Magento is not installed).

Magento useful tasks
--------------------

[](#magento-useful-tasks)

This recipe provides some Magento's related tasks:

- `magento:db-dump`: creates a gzipped database dump on the remote stage in the deploy user's home directory
- `magento:db-pull`: pulls database from the remote stage to local environment
- `magento:media-pull`: pulls Magento media from the remote stage to local environment
    - With the `media_pull_exclude_dirs` environment variable it's possible to specify which sub-directories of the media dir you want to exclude. Usage example:

        ```
        add('media_pull_exclude_dirs', ['wysiwyg']);
        ```
    - You can specify the execution timeout for this task by using the `media-pull-timeout` argument while running the command. This is needed because the default execution's time for the tasks on deployer is of 300s and when you first run this command it could take a while if the media directory is big (or maybe after a huge import). Usage example:

        ```
        dep magento:media-pull --media-pull-timeout 900

        ```

License
-------

[](#license)

This library is under the MIT license. See the complete license in the LICENSE file.

Credits
-------

[](#credits)

Developed by [Webgriffe®](http://www.webgriffe.com/). Please, report to us any bug or suggestion by GitHub issues.

###  Health Score

24

—

LowBetter than 30% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/eca104631fd7f6aff6d399ca16458c4d9814770756af0ecca22ffe2b1c5704d3?d=identicon)[mmenozzi](/maintainers/mmenozzi)

---

Top Contributors

[![LucaGallinari](https://avatars.githubusercontent.com/u/5822554?v=4)](https://github.com/LucaGallinari "LucaGallinari (10 commits)")[![mmenozzi](https://avatars.githubusercontent.com/u/1199914?v=4)](https://github.com/mmenozzi "mmenozzi (10 commits)")[![fabianaromagnoli](https://avatars.githubusercontent.com/u/23638004?v=4)](https://github.com/fabianaromagnoli "fabianaromagnoli (7 commits)")[![lamasfoker](https://avatars.githubusercontent.com/u/12940668?v=4)](https://github.com/lamasfoker "lamasfoker (1 commits)")

### Embed Badge

![Health badge](/badges/webgriffe-deployer-magento2/health.svg)

```
[![Health](https://phpackages.com/badges/webgriffe-deployer-magento2/health.svg)](https://phpackages.com/packages/webgriffe-deployer-magento2)
```

###  Alternatives

[pomander/pomander

Deployment for PHP

19615.7k2](/packages/pomander-pomander)[symfony-tools/docs-builder

The build system for Symfony's documentation

3668.5k1](/packages/symfony-tools-docs-builder)[enygma/composerclean

An additional command for Composer that removes configured files/directory

171.8k](/packages/enygma-composerclean)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
