ExpressionEngine Docs

CLI Usage

Commands can be called in the terminal of your choice in the format of:

$ php eecli.php hello

This will call eecli with a command of hello. This is the Hello World of EE commands, and will display:

Hello world

Commands can also request confirmation:

$ php eecli.php hello -c

Hello world
Are you liking these questions? (yes/no) [no]
That's good to hear!

Commands are also able to take interaction:

$ php eecli.php hello -i

Hello world
What's your name? Andy
Pleasure to meet you, Andy!

List All Commands

To view a list of all available commands, you may use the list command:

php eecli.php list

This will return a basic list of all available system and user-generated commands.

$ php eecli.php list

| Command             | Description                                                 |
| hello               | The most basic of commands                                  |
| list                | Lists all available commands                                |
| update              | Updates EE                                                  |
| cache:clear         | Clears all EE caches                                        |

Get Help

You can get help information on any command by using the --help or -h parameter when running the command.

$ php eecli.php hello -h

    Hello World -- This is a sample command used to test the CLI

    Hello World php eecli.php hello

    The most basic of commands

        Hello world, but longer

        Let's interact!

        Test the confirmation

System Commands

ExpressionEngine comes with a number of CLI commands already predefined.

Advanced Use

The following commands are for advanced usage, used in conjunction with EE upgrades for major versions. It is highly recommended to back up both your database and filesystem before utilizing them