Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/cli/built-in-commands/generate-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# `generate:templates`

Template Generator -- Creates templates based on the existing data structure.

Using pre-defined stubs provided by ExpressionEngine or add-ons, this command can generate templates, preview output, or return template metadata.

## Syntax

`php eecli.php generate:templates [generator] [--options] [--json] [--code]`

## Options list:

```
--list
-l
List available template generators

--show
-s
Show template content without writing files

--code
-c
Output only generated template code

--json
-j
Output JSON metadata for the selected generator
```

## Examples:

List available generators:

`php eecli.php generate:templates --list`

Preview templates without writing files:

`php eecli.php generate:templates <generator> --show`

Output generator metadata as JSON:

`php eecli.php generate:templates <generator> --json`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-cp-route.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:cp-route`

Control Panel Route Generator -- Creates a control panel route for an add-on.

## Syntax

`php eecli.php make:cp-route <RouteName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add MCP route to
```

## Examples:

Generate a new CP route in an existing add-on:

`php eecli.php make:cp-route Orders --addon=my_existing_addon`

Run interactively and pick the add-on when prompted:

`php eecli.php make:cp-route Orders`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-fieldtype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:fieldtype`

Fieldtype Generator -- Creates a new fieldtype for an add-on.

## Syntax

`php eecli.php make:fieldtype <FieldtypeName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add fieldtype to
```

## Examples:

Generate a fieldtype in an existing add-on:

`php eecli.php make:fieldtype StatusPicker --addon=my_existing_addon`

Run interactively and choose the add-on when prompted:

`php eecli.php make:fieldtype StatusPicker`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:jump`

Add Jumps File Generator -- Creates an add-on jump menu file.

## Syntax

`php eecli.php make:jump --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add Jump Menu file to
```

## Examples:

Generate jumps for an add-on:

`php eecli.php make:jump --addon=my_existing_addon`

Run interactively and choose the add-on when prompted:

`php eecli.php make:jump`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:sidebar`

Add-on Sidebar Generator -- Creates a control panel sidebar scaffold for an add-on.

## Syntax

`php eecli.php make:sidebar --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add sidebar to
```

## Examples:

Generate a sidebar scaffold:

`php eecli.php make:sidebar --addon=my_existing_addon`

Run interactively and select the add-on when prompted:

`php eecli.php make:sidebar`
18 changes: 5 additions & 13 deletions docs/cli/built-in-commands/make-tag.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# make:tag
# `make:tag` (legacy)

Tag Generator -- Creates a new tag for an add-on
The `make:tag` command has been renamed to `make:template-tag`.

## Options list:
Use:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add tag to
```
`php eecli.php make:template-tag MyNewTag --addon=my_existing_addon`

## Examples:

### Generating a new tag:

`php eecli.php make:tag MyNewTag --addon=my_existing_addon`
See [make:template-tag](cli/built-in-commands/make-template-tag.md) for the current command documentation.
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/make-template-tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `make:template-tag`

Template Tag Generator -- Creates a new template tag for an add-on.

## Syntax

`php eecli.php make:template-tag <TagName> --addon=<addon_short_name>`

## Options list:

```
--addon=<value>
-a <value>
Folder for third-party add-on you want to add tag to
```

## Examples:

Generate a template tag in an add-on:

`php eecli.php make:template-tag MyNewTag --addon=my_existing_addon`

Run interactively and pick the add-on when prompted:

`php eecli.php make:template-tag MyNewTag`
4 changes: 2 additions & 2 deletions docs/cli/built-in-commands/sync-file-usage.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `sync:upload-directory`
# `sync:file-usage`

This command updates old file format data to the modern format and synchronizes the file usage records in the database. File usage data for a given file in the file manager can be viewed in the [File Editor](control-panel/file-manager/file-edit.md). This functionality is also available through [Utilities - File Usage](control-panel/utilities/data-operations.md#update-file-usage-information).

## Example:

`php eecli.php sync:file-usage`
`php eecli.php sync:file-usage`
87 changes: 87 additions & 0 deletions docs/cli/built-in-commands/update-prepare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# `update:prepare`

Prepare Update -- Prepares a site for an ExpressionEngine upgrade by moving/copying files and optionally running the upgrade.

Use this for upgrade preparation workflows driven by `upgrade.config.php` and/or CLI flags.

## Syntax

`php eecli.php update:prepare`

## Options list:

```
--upgrade-ee
Start the upgrade after moving files

--force-add-on-upgrade
After upgrading EE, runs add-on upgrades

--old-base-path=<value>
Absolute path of old site

--new-base-path=<value>
Absolute path of new site

--old-public-path=<value>
Absolute path of old site public path

--new-public-path=<value>
Absolute path of new site public path

--no-config-file
Ignore upgrade.config.php and use interactive/CLI values

--ee-version
Current site version source flag used by the upgrade preparer

--should-move-system-path
Move old system folder to the new site

--old-system-path=<value>
Absolute path of old site system folder

--new-system-path=<value>
Absolute path of new site system folder

--should-move-template-path
Move old template folder to the new site

--old-template-path=<value>
Absolute path of old site template folder

--new-template-path=<value>
Absolute path of new site template folder

--should-move-theme-path
Move old theme folder to the new site

--old-theme-path=<value>
Absolute path of old site user theme folder

--new-theme-path=<value>
Absolute path of new site user theme folder

--run-preflight-hooks
Run preflight hooks defined in upgrade config

--run-postflight-hooks
Run postflight hooks defined in upgrade config

--temp-directory
Temporary working directory flag used by the upgrade preparer
```

## Examples:

Prepare upgrade interactively:

`php eecli.php update:prepare`

Prepare upgrade and run ExpressionEngine upgrade after file operations:

`php eecli.php update:prepare --upgrade-ee`

Prepare upgrade using explicit old/new base paths:

`php eecli.php update:prepare --old-base-path=/var/www/old-site --new-base-path=/var/www/new-site`
25 changes: 25 additions & 0 deletions docs/cli/built-in-commands/update-run-hook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# `update:run-hook`

Run Update Hook -- Runs one or more upgrade hooks defined in `upgrade.config.php`.

This command loads preflight/postflight hooks from your upgrade config and executes the hook names you pass as arguments.

## Syntax

`php eecli.php update:run-hook <hook_name> [additional_hook_names...]`

## Options list:

This command does not define command-specific options.

## Examples:

Run a single hook:

`php eecli.php update:run-hook preflightCacheClear`

Run multiple hooks in one invocation:

`php eecli.php update:run-hook preflightCacheClear postflightRebuildCaches`

When prompted, provide the path to your `upgrade.config.php` (or press Enter to use the default system path).
27 changes: 25 additions & 2 deletions docs/cli/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,36 @@ By default the CLI is located `system/ee/eecli.php` .

- [Basic Usage](cli/usage.md)
- Built In Commands
- Add-ons
- [addons:list - Lists all add-ons](cli/built-in-commands/addons.md)
- [addons:install - Installs an add-on](cli/built-in-commands/addons.md)
- [addons:update - Updates an add-on](cli/built-in-commands/addons.md)
- [addons:uninstall - Uninstalls an add-on](cli/built-in-commands/addons.md)
- [backup:database - Backup database](cli/built-in-commands/backup-database.md)
- [Clear Cache](cli/built-in-commands/cache-clear.md)
- [channels:list - List channels](cli/built-in-commands/channels-list.md)
- Config
- [config:config - Update config.php values](cli/built-in-commands/config-management.md)
- [config:env - Update .env.php values](cli/built-in-commands/config-management.md)
- [fields:list - List fields](cli/built-in-commands/fields-list.md)
- [fieldtypes:list - List fieldtypes](cli/built-in-commands/fieldtypes-list.md)
- Generate
- [generate:templates - Generate templates](cli/built-in-commands/generate-templates.md)
- [List](cli/built-in-commands/list.md)
- Make
- [make:action - Creates a new action for an add-on](cli/built-in-commands/make-action.md)
- [make:addon - Creates a new add-on](cli/built-in-commands/make-addon.md)
- [make:command - Creates a new CLI command for an add-on](cli/built-in-commands/make-command.md)
- [make:cp-route - Creates a control panel route for an add-on](cli/built-in-commands/make-cp-route.md)
- [make:extension-hook - Implements an EE extension hook in an add-on](cli/built-in-commands/make-extension-hook.md)
- [make:fieldtype - Creates a fieldtype for an add-on](cli/built-in-commands/make-fieldtype.md)
- [make:jump - Creates jump menu file for an add-on](cli/built-in-commands/make-jump.md)
- [make:migration - Creates a new migration](cli/built-in-commands/make-migration.md)
- [make:model - Creates a new model for an add-on](cli/built-in-commands/make-model.md)
- [make:prolet - Creates a new prolet for an add-on](cli/built-in-commands/make-prolet.md)
- [make:tag - Creates a new tag for an add-on](cli/built-in-commands/make-tag.md)
- [make:service - Creates a new service for an add-on](cli/built-in-commands/make-service.md)
- [make:sidebar - Creates a sidebar for an add-on](cli/built-in-commands/make-sidebar.md)
- [make:template-tag - Creates a new template tag for an add-on](cli/built-in-commands/make-template-tag.md)
- [make:widget - Generates widgets for existing add-ons](cli/built-in-commands/make-widget.md)
- Migrate
- [migrate - Runs specified migrations (all, core, or add-ons)](cli/built-in-commands/migrate.md)
Expand All @@ -32,7 +51,11 @@ By default the CLI is located `system/ee/eecli.php` .
- [sync:file-usage - Sync files usage](cli/built-in-commands/sync-file-usage.md)
- [sync:reindex - Sync content used in search indexes](cli/built-in-commands/sync-reindex.md)
- [sync:upload-directory - Sync files in an upload directory](cli/built-in-commands/sync-upload-directory.md)
- [Update ExpressionEngine](cli/built-in-commands/update.md)
- Update
- [update - Update ExpressionEngine](cli/built-in-commands/update.md)
- [update:prepare - Prepare site files for update](cli/built-in-commands/update-prepare.md)
- [update:run-hook - Run update hooks from upgrade config](cli/built-in-commands/update-run-hook.md)
- [version - Show version details](cli/built-in-commands/version.md)
- [Creating a Command](cli/creating-a-command.md)
- [Defining Input](cli/defining-input.md)
- [Displaying Output](cli/displaying-output.md)
1 change: 1 addition & 0 deletions docs/general/system-configuration-overrides.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@ Specify a different [caching driver](optimization/caching.md#caching-drivers) to
| Values | Description |
| --------- | -------------------------------------------------- |
| file | File driver, /system/user/cache/ (default) |
| database | Database driver, uses the DB for caching |
| memcached | Memcached driver, configured with memcached config |
| redis | Redis driver, configured with redis config |
| dummy | Dummy driver, will not cache |
Expand Down
2 changes: 2 additions & 0 deletions docs/optimization/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ By default, ExpressionEngine uses a file-based caching driver, meaning cached it

ExpressionEngine currently supports Memcached and Redis for memory-based caching. You can set which driver is being used in the control panel or via the [cache_driver](general/system-configuration-overrides.md#cache_driver) config override. [Memcached](general/system-configuration-overrides.md#memcached) and [Redis](general/system-configuration-overrides.md#redis) server information can also be set in `config.php`, otherwise ExpressionEngine will try to connect to the default respective ports on localhost.

You can also set caching to Database, which uses the same database for cache data as the rest of your site data. There are pros and cons to this approach. If you can't easily use memcached or redis, database caching can be another way to use RAM-based caching; on the other hand, this can create additional database read and write calls that can be slower than file or memory-based caching choices. Database works well in load balanced environments, where memcache and redis are more difficult to work with due to the difficulty in synchronizing across servers. Test out database caching performance and compare your specific results before committing to it.

A [backup driver](general/system-configuration-overrides.md#cache_driver_backup) can also be specified in the case your primary driver is unavailable. By default, the backup driver is the file driver and it's likely the best failover option due to its reliability, but the backup driver is configurable.

Add-on developers can find more information about using caching drivers to store and retrieve items in the [Cache Class](development/legacy/libraries/cache.md) documentation.
Expand Down