Command Line Interface (CLI)

Enact provides some helpful CLI tools to make your life easier.

On top of the CLI commands that ship with the Disco PHP Framework, Enact provides some of its own.

The syntax is pretty simple and you run commands from the root of your project:

php public/index.php commandName arg0 arg1


You can use the setPassword command if you ever get locked out of the CMS for some reason (say your email configuration stopped working and you can't remember your password).

Run it like so:

php public/index.php setPassword '' 'your-new-password'


You can use the createPlugin command to create a bare bones plugin for use with Enact. See the plugin introduction for more information.

Run it like so:

php public/index.php createPlugin 'YourPluginName'


You can create a new DB backup with the enactDBBackup command, this will create a new back up in the enact/storage/db/ directory, with a naming convention like {Your-Site-Name}.{unix timestamp}.{current enact version}.sql, note that this is the same convention used when creating backups via the database settings admin screen.

Run it like so:

php public/index.php enactDBBackup


You can restore your most recently created DB backup using the enactRestoreDBFromLatestBackup command.

Run it like so:

php public/index.php enactRestoreDBFromLatestBackup