Skip to main content
Version: 2026.1

Deployment Tools

Pimcore provides the following tools to support deployment processes.

Deployment hint

For deployments without database access (e.g. CI pipelines), Doctrine ORM cache warm-up fails because it tries to detect the database version. Configure the server version explicitly in the default DBAL connection:

doctrine:
dbal:
default_connection: default
connections:
default:
...
server_version: mariadb-10.11.0

Pimcore Configurations

Pimcore has two categories of configuration:

Symfony-only configurations (config/ directory) are standard Symfony YAML/PHP config files. These are always file-based, included in version control, and deployed alongside code. Use Symfony configuration environments to define different values per deployment stage.

Studio-editable configurations (thumbnails, custom reports, static routes, perspectives, document types, predefined properties, custom views, etc.) use the LocationAwareConfigRepository, which supports two storage backends:

  • symfony-config - YAML files on the filesystem (default directory: var/config/). Suitable for version control and file-based deployment. In production without debug mode, these files are compiled into the Symfony container and are read-only - changes on disk have no effect until the cache is rebuilt.
  • settings-store - Database-backed key-value storage. Allows runtime editing through Pimcore Studio in production.

Each configuration type has independent read and write targets, configurable per environment. See Configuration Environments for details on setting up read/write targets and handling production deployments.

Pimcore Class Definitions

Pimcore class definitions are stored as PHP configuration files and can be added to version control and deployed across stages.

The PHP configuration files and classes are written to var/classes by default. To make a class read-only, create a copy at config/pimcore/classes.

The optional environment variable PIMCORE_CLASS_DEFINITION_WRITABLE controls write access:

  • 0 - Disallow all write access, including creation of new classes.
  • 1 - Allow modification of all classes, including those in config/pimcore/classes that are normally read-only.
  • Not set - Classes in config/pimcore/classes are read-only; new classes are created in var/classes.

Use the environment variable PIMCORE_CLASS_DEFINITION_DIRECTORY to specify a custom directory for class definitions instead of var/classes or config/pimcore/classes.

note

Changes to class definitions affect both configuration files and the database. When deploying changes between stages, deploy database changes with the pimcore:deployment:classes-rebuild command.

Run pimcore:deployment:classes-rebuild after every code update to push changes to the database:

bin/console pimcore:deployment:classes-rebuild

To update only the database structure without dumping classes to the file system:

bin/console pimcore:deployment:classes-rebuild --db-only

To create new classes from configuration files in the database:

bin/console pimcore:deployment:classes-rebuild --create-classes

If you use Composer's autoloader optimization, register newly created classes with:

composer dump-autoload --optimize

As an alternative, use the class export/import commands for JSON-based definitions:

bin/console pimcore:definition:import:objectbrick /brick_jsonfile_path.json

bin/console pimcore:definition:import:fieldcollection /collection_jsonfile_path.json

bin/console pimcore:definition:import:class /class_jsonfile_path.json

Pimcore Console

The Pimcore Console provides several useful commands for deployment. Integrate these into custom deployment workflows as needed.

Run bin/console list for a full list of available commands.

Useful Deployment Commands

CommandDescription
pimcore:mysql-toolsOptimize and warm up the MySQL database
pimcore:search-backend-reindexRe-index the backend search (requires SimpleBackendSearchBundle)
pimcore:cache:clearClear Pimcore core caches
cache:clearClear Symfony caches
pimcore:cache:warmingWarm up caches
pimcore:classificationstore:delete-storeDelete a Classification Store
pimcore:definition:import:classImport a class definition from a JSON export
pimcore:definition:import:customlayoutImport a custom layout definition from a JSON export
pimcore:definition:import:fieldcollectionImport a FieldCollection definition from a JSON export
pimcore:definition:import:objectbrickImport an ObjectBrick definition from a JSON export
pimcore:definition:import:unitsImport quantity value unit definitions from a JSON export
pimcore:deployment:classes-rebuildRebuild classes and database structure based on updated var/classes/definition_*.php files
pimcore:thumbnails:imageGenerate image thumbnails. Use --processes for parallel processing.
pimcore:thumbnails:optimize-imagesOptimize file size of all images in public/var/tmp
pimcore:thumbnails:videoGenerate video thumbnails. Use --processes for parallel processing.

Find more about the Pimcore Console on the dedicated page.

Content Migration

Pimcore does not provide content migration between environments and does not recommend it.

Create and manage content in the production environment. Control visibility with built-in features: publishing/unpublishing, versioning, scheduling, and editmode preview.

Editors should create and modify content on a single environment (typically production) rather than maintaining content across multiple stages.

If content migration is necessary, it is always a project-specific task depending on the data model, environments, and use cases. Use the PHP API for assets, objects, and documents.