Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.



Package Manager. This documentation page applies to all version of ezpublish 4.x






Display output using ANSI colors (default).

--db-host HOST

Set host name for database connection.

--db-name NAME

Set name of database to use.

--db-password PASSWD

Set password for database user.

--db-socket SOCKET

Set socket for database connection.

--db-type TYPE

Set type of database to use.


Create log files.

-l,--login USER

login with USER and use it for all operations


Do not use ANSI coloring.


Do not create log files (default).

-p,--password PWD

Use PWD as password for USER

-r,--repos REPOS

Use REPOS for repository when accessing packages


Selected siteaccess for operations, if not specified default siteaccess is used


The ezpm.php script, located in the root directory of eZ Publish, allows to execute package management operations from the command line.
This is very useful to eg. import a package that is too big and would result in a timeout if imported via the web interface (or viceversa to create a very big export package).

add <packagename> <contentobject> [options] [path|node]

Adding classes, templates and objects to the package.




Include class definitions in package (default)


Include related template files in package (default)


Do not include class definitions in package


Do not include related template files in package


Comma separated list of languages to export. If not supplied the value is taken from settings. 


Export only the published version for all objects. (default)


Export all versions for all objects.


Export only main node for all objects. (default)


Export all nodes for all objects.


Comma separated list of siteaccess to get definitions from, determines template override data and designs.
If not supplied the value is taken from default siteaccess.


The path is chosen in the same manner as the URL alias which is shown in the path in the browser. If you want to export all objects under the node you must add /* to the end of the path
e.g. news/this_is_news ,news or news/*
Note: To fetch the entire tree including users and media you must use an empty string, e.g. '' 

create <packagename> <summary>

$ php -C ezpm.php create staff "all the staff members"


Export packages for saving them

$ php -C ezpm.php export test_package --output -d /your/folder

info <packagename>

Show Information for packages


Load the package into the eZ Publish instance

$ php -C ezpm.php --debug import test_package-1.0-1.ezpkg


Integrate the package to the eZ Publish instance

$ php -C ezpm.php --debug install test_package

import and install

You can combine the import and install commands in one line.

$ php -C ezpm.php --debug import test_package-1.0-1.ezpkg php ezpm.php --debug install test_package


List all packages

set <package> <attribute> <attributevalue>

$ php -C ezpm.php set staff vendor "John Doe"

Edit package information


Filtering added content

You can filter content you are adding to packages. This is done by calling packagehandler classes (see kernel/classes/packagehandler) and specifying dedicated parameters. Note that this is not fully documented and not supported as the recommended way it to use the admin interface. The following command lines are just provided as examples of this usage.

Create a new package and add contentclasses to it

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

$ php -C ezpm.php create testclasspackage
$ php -C ezpm.php add testclasspackage ezcontentclass folder,article
$ php -C ezpm.php set testclasspackage type contentclass
Create a new package and add a subtree to it (by path)
$ php -C ezpm.php create test_package "Test Package Creation"
$ php -C ezpm.php add test_package ezcontentobject --exclude-templates --exclude-classes --siteaccess=eng "your_path_to_content/*"
Create a new package and add a subtree to it (by nodeid) including all nodes of all objects

Note: make sure to have the patch for applied. It is included in ezpublish 5.4, and will apply on older versions.

For example with node ID 74

$ php -C ezpm.php create test_package2 "Test Package Creation2"
$ php -C ezpm.php add test_package2 ezcontentobject --exclude-templates --node-selected --exclude-classes --siteaccess=eng 74

Sarah Haïm-Lubczanski (25/08/2014 2:34 pm)

Yannick Roger (28/02/2017 9:14 am)

Sarah Haïm-Lubczanski, Yannick Roger


There are no comments.