# this command needs anyway executed via cron or similar task scheduler
# it fills the message queue with the necessary tasks, which are then processed by messenger:consume
*/5 * * * * /your/project/bin/console pimcore:maintenance --async
# it's recommended to run the following command using a process control system like Supervisor
# please follow the Symfony Messenger guide for a best practice production setup:
# https://symfony.com/doc/current/messenger.html#deploying-to-production
*/5 * * * * /your/project/bin/console messenger:consume pimcore_core pimcore_maintenance --time-limit=300
namespace App;
/*use HWI\Bundle\OAuthBundle\HWIOAuthBundle;*/
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Pimcore\Kernel as PimcoreKernel;
class Kernel extends PimcoreKernel
{
/**
* Adds bundles to register to the bundle collection. The collection is able
* to handle priorities and environment specific bundles.
*
* @param BundleCollection $collection
*/
public function registerBundlesToCollection(BundleCollection $collection)
{
// activate bundle for SSO oauth login/register functionality
if (class_exists('\Http\HttplugBundle\HttplugBundle')) {
$collection->addBundle( new \Http\HttplugBundle\HttplugBundle());
}
/*$collection->addBundle(HWIOAuthBundle::class);*/
}
}
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--ignore-maintenance-mode Set this flag to force execution in maintenance mode
--maintenance-mode Set this flag to force maintenance mode while this task runs
-e, --env=ENV The Environment name. [default: "prod"]
--no-debug Switch off debug mode.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Display information about the current project
completion Dump the shell completion script
help Display help for a command
list List commands
app
app:asset-copyright
app:data-command
assets
assets:install Install bundle's web assets under a public directory
cache
cache:clear Clear the cache
cache:pool:clear Clear cache pools
cache:pool:delete Delete an item from a cache pool
cache:pool:list List available cache pools
cache:pool:prune Prune cache pools
cache:warmup Warm up an empty cache
config
config:dump-reference Dump the default configuration for an extension
dbal
dbal:run-sql Executes arbitrary SQL directly from the command line.
debug
debug:autowiring List classes/interfaces you can use for autowiring
debug:config Dump the current configuration for an extension
debug:container Display current services for an application
debug:dotenv Lists all dotenv files with variables and values
debug:event-dispatcher Display configured listeners for an application
debug:firewall Display information about your security firewall(s)
debug:form Display form type information
debug:messenger List messages you can dispatch using the message buses
debug:router Display current routes for an application
debug:translation Display translation messages information
debug:twig Show a list of twig functions, filters, globals and tests
debug:validator Display validation constraints for classes
doctrine
doctrine:database:create Creates the configured database
doctrine:database:drop Drops the configured database
doctrine:database:import Import SQL file(s) directly to Database.
doctrine:migrations:current [current] Outputs the current version
doctrine:migrations:diff [diff] Generate a migration by comparing your current database to your mapping information.
doctrine:migrations:dump-schema [dump-schema] Dump the schema for your database to a migration.
doctrine:migrations:execute [execute] Execute one or more migration versions up or down manually.
doctrine:migrations:generate [generate] Generate a blank migration class.
doctrine:migrations:latest [latest] Outputs the latest version
doctrine:migrations:list [list-migrations] Display a list of all available migrations and their status.
doctrine:migrations:migrate [migrate] Execute a migration to a specified version or the latest available version.
doctrine:migrations:rollup [rollup] Rollup migrations by deleting all tracked versions and insert the one version that exists.
doctrine:migrations:status [status] View the status of a set of migrations.
doctrine:migrations:sync-metadata-storage [sync-metadata-storage] Ensures that the metadata storage is at the latest version.
doctrine:migrations:up-to-date [up-to-date] Tells you if your schema is up-to-date.
doctrine:migrations:version [version] Manually add and delete migration versions from the version table.
doctrine:query:sql Executes arbitrary SQL directly from the command line.
fos
fos:js-routing:debug Displays currently exposed routes for an application
fos:js-routing:dump Dumps exposed routes to the filesystem
lint
lint:container Ensure that arguments injected into services match type declarations
lint:twig Lint a Twig template and outputs encountered errors
lint:xliff Lint an XLIFF file and outputs encountered errors
lint:yaml Lint a YAML file and outputs encountered errors
messenger
messenger:consume Consume messages
messenger:setup-transports Prepare the required infrastructure for the transport
messenger:stop-workers Stop workers after their current message
pimcore
pimcore:bundle:disable Disables a bundle
pimcore:bundle:enable Enables a bundle
pimcore:bundle:install Installs a bundle
pimcore:bundle:list Lists all pimcore bundles and their enabled/installed state
pimcore:bundle:uninstall Uninstalls a bundle
pimcore:cache:clear Clear caches
pimcore:cache:warming Warm up caches
pimcore:classificationstore:delete-store [classificationstore:delete-store] Delete Classification Store
pimcore:definition:import:class [definition:import:class] Import Class definition from a JSON export
pimcore:definition:import:customlayout [definition:import:customlayout] Import Customlayout definition from a JSON export
pimcore:definition:import:fieldcollection [definition:import:fieldcollection] Import FieldCollection definition from a JSON export
pimcore:definition:import:objectbrick [definition:import:objectbrick] Import ObjectBrick definition from a JSON export
pimcore:deployment:classes-rebuild [deployment:classes-rebuild] rebuilds db structure for classes, field collections and object bricks based on updated var/classes/definition_*.php files
pimcore:deployment:custom-layouts-rebuild rebuilds db structure for custom layouts based on updated var/classes/customlayouts/definition_*.php files
pimcore:documents:generate-page-previews Generates the previews shown in the tree on hover
pimcore:documents:generate-static-pages Regenerate static pages
pimcore:documents:migrate-elements Migrates document elements to editables. See issue https://github.com/pimcore/pimcore/issues/7384 first
pimcore:email:cleanup [email:cleanup] Cleanup email logs
pimcore:image:low-quality-preview [pimcore:image:svg-preview] Regenerates low quality image previews for all image assets
pimcore:locale:delete-unused-tables Delete unused locale(invalid language) tables & views
pimcore:maintenance [maintenance] Asynchronous maintenance jobs of pimcore (needs to be set up as cron job)
pimcore:maintenance-mode Enable or disable maintenance mode
pimcore:migrate:storage Migrate data from one storage to another
pimcore:mysql-tools [mysql-tools] Optimize and warmup mysql database
pimcore:recyclebin:cleanup Cleanup recyclebin entries
pimcore:run-script Run a specific PHP script in an initialized Pimcore environment
pimcore:search-backend-reindex [search-backend-reindex] Re-indexes the backend search of pimcore
pimcore:system:requirements:check [system:requirements:check] Check system requirements
pimcore:thumbnails:clear Clear certain image or video thumbnails (temp. files)
pimcore:thumbnails:image [thumbnails:image] Generate image thumbnails, useful to pre-generate thumbnails in the background
pimcore:thumbnails:optimize-images [thumbnails:optimize-images] Optimize filesize of all thumbnails
pimcore:thumbnails:video [thumbnails:video] Generate video thumbnails, useful to pre-generate thumbnails in the background
pimcore:user:reset-password [reset-password] Reset a user's password
pimcore:workflow:dump Dump a workflow
presta
presta:sitemaps:dump Dumps sitemaps to given location
router
router:match Help debug routes by simulating a path info match
secrets
secrets:decrypt-to-local Decrypt all secrets and stores them in the local vault
secrets:encrypt-from-local Encrypt all local secrets to the vault
secrets:generate-keys Generate new encryption keys
secrets:list List all secrets
secrets:remove Remove a secret from the vault
secrets:set Set a secret in the vault
security
security:encode-password Encode a password
security:hash-password Hash a user password
translation
translation:extract [translation:update] Extract missing translations keys from code to translation files.
translation:pull Pull translations from a given provider.
translation:push Push translations to a given provider.
Pimcore offers a static page generator service, which generates static HTML files out of pages (documents). These static files can be delivered directly by Apache/Nginx instead of going through complete PHP driven MVC cycle on a frontend request. This feature is not recommended for a page with dynamic content i.e. news listing, product pages, and so on, where content changes frequently.
<?php
namespace App;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Pimcore\Kernel as PimcoreKernel;
class Kernel extends PimcoreKernel
{
/**
* Adds bundles to register to the bundle collection. The collection is able
* to handle priorities and environment specific bundles.
*
* @param BundleCollection $collection
*/
public function registerBundlesToCollection(BundleCollection $collection)
{
if (class_exists('\\XYZBundle\\XYZBundle')) {
$collection->addBundle(new \XYZBundle\XYZBundle);
}
// add a custom third-party bundle here with a high priority and only for dev environment
$collection->addBundle(new Third\Party\PartyBundle, 10, ['dev']);
}
}