diff --git a/docs/cli/built-in-commands/generate-templates.md b/docs/cli/built-in-commands/generate-templates.md new file mode 100644 index 000000000..688be70bc --- /dev/null +++ b/docs/cli/built-in-commands/generate-templates.md @@ -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 --show` + +Output generator metadata as JSON: + +`php eecli.php generate:templates --json` diff --git a/docs/cli/built-in-commands/make-cp-route.md b/docs/cli/built-in-commands/make-cp-route.md new file mode 100644 index 000000000..fe7032284 --- /dev/null +++ b/docs/cli/built-in-commands/make-cp-route.md @@ -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 --addon=` + +## Options list: + +``` + --addon= + -a + 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` diff --git a/docs/cli/built-in-commands/make-fieldtype.md b/docs/cli/built-in-commands/make-fieldtype.md new file mode 100644 index 000000000..94900cc51 --- /dev/null +++ b/docs/cli/built-in-commands/make-fieldtype.md @@ -0,0 +1,25 @@ +# `make:fieldtype` + +Fieldtype Generator -- Creates a new fieldtype for an add-on. + +## Syntax + +`php eecli.php make:fieldtype --addon=` + +## Options list: + +``` + --addon= + -a + 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` diff --git a/docs/cli/built-in-commands/make-jump.md b/docs/cli/built-in-commands/make-jump.md new file mode 100644 index 000000000..6cde3db74 --- /dev/null +++ b/docs/cli/built-in-commands/make-jump.md @@ -0,0 +1,25 @@ +# `make:jump` + +Add Jumps File Generator -- Creates an add-on jump menu file. + +## Syntax + +`php eecli.php make:jump --addon=` + +## Options list: + +``` + --addon= + -a + 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` diff --git a/docs/cli/built-in-commands/make-sidebar.md b/docs/cli/built-in-commands/make-sidebar.md new file mode 100644 index 000000000..c7537c777 --- /dev/null +++ b/docs/cli/built-in-commands/make-sidebar.md @@ -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=` + +## Options list: + +``` + --addon= + -a + 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` diff --git a/docs/cli/built-in-commands/make-tag.md b/docs/cli/built-in-commands/make-tag.md index e420e245f..c58b30b93 100644 --- a/docs/cli/built-in-commands/make-tag.md +++ b/docs/cli/built-in-commands/make-tag.md @@ -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= - -a - 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. diff --git a/docs/cli/built-in-commands/make-template-tag.md b/docs/cli/built-in-commands/make-template-tag.md new file mode 100644 index 000000000..d5b6db759 --- /dev/null +++ b/docs/cli/built-in-commands/make-template-tag.md @@ -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 --addon=` + +## Options list: + +``` + --addon= + -a + 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` diff --git a/docs/cli/built-in-commands/sync-file-usage.md b/docs/cli/built-in-commands/sync-file-usage.md index 94c513521..9228d124f 100644 --- a/docs/cli/built-in-commands/sync-file-usage.md +++ b/docs/cli/built-in-commands/sync-file-usage.md @@ -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` \ No newline at end of file +`php eecli.php sync:file-usage` diff --git a/docs/cli/built-in-commands/update-prepare.md b/docs/cli/built-in-commands/update-prepare.md new file mode 100644 index 000000000..c0b47b7bc --- /dev/null +++ b/docs/cli/built-in-commands/update-prepare.md @@ -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= + Absolute path of old site + + --new-base-path= + Absolute path of new site + + --old-public-path= + Absolute path of old site public path + + --new-public-path= + 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= + Absolute path of old site system folder + + --new-system-path= + Absolute path of new site system folder + + --should-move-template-path + Move old template folder to the new site + + --old-template-path= + Absolute path of old site template folder + + --new-template-path= + Absolute path of new site template folder + + --should-move-theme-path + Move old theme folder to the new site + + --old-theme-path= + Absolute path of old site user theme folder + + --new-theme-path= + 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` diff --git a/docs/cli/built-in-commands/update-run-hook.md b/docs/cli/built-in-commands/update-run-hook.md new file mode 100644 index 000000000..b5fad6f01 --- /dev/null +++ b/docs/cli/built-in-commands/update-run-hook.md @@ -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 [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). diff --git a/docs/cli/intro.md b/docs/cli/intro.md index 53674a568..b23cb06c2 100644 --- a/docs/cli/intro.md +++ b/docs/cli/intro.md @@ -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) @@ -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) diff --git a/docs/general/system-configuration-overrides.md b/docs/general/system-configuration-overrides.md index 2f31913f2..9bfba3cdc 100755 --- a/docs/general/system-configuration-overrides.md +++ b/docs/general/system-configuration-overrides.md @@ -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 | diff --git a/docs/optimization/caching.md b/docs/optimization/caching.md index b4e0cfa48..947863b33 100755 --- a/docs/optimization/caching.md +++ b/docs/optimization/caching.md @@ -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.