Skip to content

Stratus CLI

The Stratus Command Line Interface (CLI) is available to run cache clearing and other commands for easier management of a Magento deployment

The following commands are accessible via SSH access. See the *SSH > SSH Info* Stratus Control panel for access parameters.


Run /usr/share/stratus/cli help for a list of viewable commands with descriptions.

Command Format

CLI commands are entered as /usr/share/stratus/cli <command>. For example, to use the command database.config run /usr/share/stratus/cli database.config

Common Commands


If autoscaling is enabled, this command will issue a redeploy of PHP-FPM services and update the code copied out to the various physical nodes. This is a rolling redeployment for zero instance downtime and minimal site downtime. The command executes asynchronously and will return before all the redeployment is completed.

NOTE: On average a redeployment takes several seconds or more depending on the size of the code base deployed.


Except for Redis or Memcache sessions, this command clears all other caches, including Cloudfront, PHP OpCache, Redis FPC, Redis Config, and Varnish (if enabled).

NOTE: CloudFront may take up to 15 minutes to clear all edge nodes.


Flushes only the PHP OpCache.


Clears the CloudFront CDN cache, and can take up to 15 minutes to complete.


Flushes Redis. Equivalent to running redis-cli -h redis flushall.


Purges Varnish cache.


Returns the database credentials in JSON format.


Installs the latest Magento 2 code base.

NOTE: this will completely delete all data and replace the code base.


Adds PHP option values, such as "memory_limit." For example, to set the PHP memory limit to 4,096 megabytes, run php.options.add memory_limit=4096M.


Removes PHP option values previously added using php.options.add.

See also Deploying on Stratus.