PHPackages                             rafaelstz/deployer-magemojo - 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. [CLI &amp; Console](/categories/cli)
4. /
5. rafaelstz/deployer-magemojo

ActiveLibrary[CLI &amp; Console](/categories/cli)

rafaelstz/deployer-magemojo
===========================

MageMojo Stratus Deployer Recipe

1.1.0(4y ago)93.7k5[2 issues](https://github.com/rafaelstz/deployer-magemojo/issues)MITPHP

Since Jan 10Pushed 2y ago1 watchersCompare

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

READMEChangelogDependencies (6)Versions (5)Used By (0)

 [![Magemojo Stratus Deployer Recipe](https://camo.githubusercontent.com/666c2bab8fbfe126238f1ff0167d2c795f5bfe6c2c916b3fe51dcfd9365b5c05/68747470733a2f2f6d6167656d6f6a6f2e636f6d2f6d6167656e746f2f736b696e2f66726f6e74656e642f622d726573706f6e736976652f6d6167656d6f6a6f2f696d616765732f6d6f6a6f737472617475732e706e67 "MageMojo Deployer Recipe")](https://camo.githubusercontent.com/666c2bab8fbfe126238f1ff0167d2c795f5bfe6c2c916b3fe51dcfd9365b5c05/68747470733a2f2f6d6167656d6f6a6f2e636f6d2f6d6167656e746f2f736b696e2f66726f6e74656e642f622d726573706f6e736976652f6d6167656d6f6a6f2f696d616765732f6d6f6a6f737472617475732e706e67)
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-------)

 Easily run cache clearing in your deployments

[](#----easily-run-cache-clearing-in-your-deployments--)

[![Build Status](https://camo.githubusercontent.com/3946c58297a1af311020f062643b520945953f4b8ff60b93abd05f7ec8fd2aaf/68747470733a2f2f6170702e7472617669732d63692e636f6d2f72616661656c73747a2f6465706c6f7965722d6d6167656d6f6a6f2e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/github/rafaelstz/deployer-magemojo)[![Tags](https://camo.githubusercontent.com/34ebfbe7ab8de959ab7cd86f2f269a7b64af19346dbf9aa2c9a9b9f5f69bc855/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f72616661656c73747a2f6465706c6f7965722d6d6167656d6f6a6f2e737667)](https://github.com/rafaelstz/deployer-magemojo/releases)[![Total Downloads](https://camo.githubusercontent.com/04fb5b44fc90b55c973c3e6f68fcd6f5a1e443829ffd8f2edbf69984c51924d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616661656c73747a2f6465706c6f7965722d6d6167656d6f6a6f2e737667)](https://packagist.org/packages/rafaelstz/deployer-magemojo)

Use this tool integrated with the [Deployer](https://deployer.org/) to use the power of [MageMojo Stratus CLI](https://magemojo.com/kb/knowledge-base/stratus-cli/).

If you are using Magento 2 you can use this [Magento 2 Deployer Recipe](https://github.com/rafaelstz/deployer-magento2) together!

Features
--------

[](#features)

You can run the command followed by **dep**. Example: `dep mm:cache:clear --stage=production`.

CommandDescriptionmm:cron:stopStop Crons from runningmm:cron:startStart cronsmm:zdd:initZero Downtime Deployment Initmm:zdd:switchZero Downtime Deployment Switch with checkmm:autoscaling:reinitIt will issue a redeploy of PHP-FPM servicesmm:cache:clearClears everythingmm:cloudfront:clearClears Cloudfront cachemm:opcache:clearClears OPCache cachemm:redis:clearClears Redis cachemm:varnish:clearClears Varnish cacheHow to install
--------------

[](#how-to-install)

How to install Deployer:

```
curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep

```

How to install this package:

```
composer require rafaelstz/deployer-magemojo --dev

```

How to use
----------

[](#how-to-use)

After install it, you can add the line below after the **namespace** and run `dep` to check:

```
// MageMojo Recipe
require __DIR__ . '/vendor/rafaelstz/deployer-magemojo/MageMojo.php';
```

This recipe when installed automatically will clean all caches after the deploy success, but if you want to restart all services, add these into the bottom:

```
// MageMojo restart services
before('deploy', 'mm:cron:stop');
after('deploy', 'mm:cron:start');
after('success', 'mm:autoscaling:reinit');

// MageMojo clean all caches
after('success', 'mm:cloudfront:clear');
after('success', 'mm:varnish:clear');
after('success', 'mm:redis:clear');
```

For example:
------------

[](#for-example)

```
