Command line package manager

This is a Stub article. Help the eZ Publish community by expanding it!

The eZ publish package manager can be called from the command line: ezpm.php. Don't forget that ezpm.php has to be called from the root directory of your eZ publish installation.


Use the --help option to get an overview of all available global options.

> ./ezpm.php --help


The command line package manager understands several commands. The help command itself (or shorter: ? or h) gives you an overview of the available commands.

> ./ezpm.php help

Each command accepts specific arguments and options. To get help about a specific command, use the help command together with the name of the command you want to get more information about.

> ./ezpm.php help create

You can specify multiple commands in one call by separating them with --.



With the set command you can specify a value for certain package properties. The first argument to the set command is the package name, the second argument is the property name and the third argument the property value. Most of the property names available to the set command have a corresponding element or attribute in the package definition.


You can add several items to a package. The add command accepts the name of the package as a first argument, and the item type as a second argument. Any other arguments are specific for each item type. Type aliases are defined in package.ini [PackageSettings]HandlerAlias[].


aliases: contentclass

The first and only argument is a comma-separated list of content class id's and/or identifiers

If you're only adding content classes to your package, you should also set the type of the package to "contentclass".

> ./ezpm.php create testclasspackage -- add testclasspackage ezcontentclass folder,article -- set testclasspackage type contentclass


aliases: contentobject

Make sure you use the --login and --password options for ezpm when exporting subtrees, because read permissions are taking into account when fetching subtrees.

> php ezpm.php --debug=all --login=admin --password=publish create userexport -- add userexport ezcontentobject --exclude-classes --exclude-templates --current-version "users/guest_accounts/*"


aliases: iniaddon


aliases: file, ini, design, template, thumbnail


aliases: sql

You can use the -d option to specify the database type (mysql, postgresql). The package can't be installed into other databases then. The arguments are paths to the SQL files.

> php ezpm.php --debug=all create dbtest -- add dbtest sql  -d mysql test1.sql test2.sql


aliases: extension


aliases: installscript






Tips for automation

If you often need to repeat the same actions with the command line package manager, then create one or more shell scripts with the needed commands. The site style packages used by eZ publish 3.8 and lower are generated by a shell script too. Take a look at

External resources