Skip to content

Stratus CLI

The Stratus CLI is available to run cache clearing and a few other commands for ease of use in your deployments. All the commands are detailed below.

To get started you can type /usr/share/stratus/cli help

Then a list of commands is viewable with brief descriptions.

The format is always /usr/share/stratus/cli <command> i.e. /usr/share/stratus/cli database.config


If you have autoscaling enabled, this command will issue a redeploy of PHP-FPM services and update code copied out to the various physical nodes. This is a rolling redeploy for zero instance downtime & minimal site downtime. The command executes asynchronously and will return before all the redeploy is completed. PLEASE NOTE: On average a redeploy takes several seconds & depends on the size of your code base.


Clears almost everything: CloudFront, PHP OpCache, Redis FPC cache, Redis Config Cache and Varnish (if applicable). CloudFront can take up to 15 minutes to clear on all the edge nodes. This command does not clear Redis Sessions (redis-session) or Memcache


Flush only the PHP OpCache.


Clears Cloudfront CDN cache only. This can take up to 15 minutes.


Flushes Redis, equivalent to redis-cli -h redis flushall.


Purges Varnish.


Returns your database credentials in JSON format.


Installs latest Magento 2 – this is DESTRUCTIVE and will delete your data.


Lets you add PHP values such a memory_limit etc i.e. Ex. php.options.add memory_limit=4096M and so on


The opposite of add in the same format.


For example, lets clear all the things!

magemojo@svc-magentoperformance-io:~$ /usr/share/stratus/cli cache.all.clear
{"args":["Result: {\"Memcache cache clear\": \"Success\", \"CloudFront cache invalidation\": \"Success\", \"Redis cache clear\": \"Success\", \"Varnish cache clear\": \"Success\", \"OPCache cache clear\": \"Success\"}"]}
2019-03-11T16:20:07+0000 Main loop terminated.

See also Deploy To Stratus