Status colour Yellow title Work in progress, for testers Table of Contents
This section describes how to upgrade your existing eZ Publish 5.2 installation to version 5.4. Make sure that you have a working backup of the site before you do the actual upgrade, and make sure that the installation you are performing the upgrade on is offline.
...
Step 3: upgrade the database
Info |
---|
This step assumes use of the built in database drivers, mysql (incl mariadb) and PostgreSQL, for other databases supported via extension please use scripts and documentation provided by extension. |
Import to your database the changes provided in
...
Define a Doctrine connection
Code Block language bash title MySQL settings : ezpublish.yml or config.yml doctrine: dbal: connections: my_connection: driver: pdo_mysql host: localhost port: 3306 dbname: my_database user: my_user password: my_password charset: UTF8
Code Block language bash title PostGreSQL : ezpublish.yml or config.yml collapse true doctrine: dbal: connections: my_connection: driver: pdo_pgsql host: localhost port: 5432 dbname: my_database user: my_user password: my_password charset: UTF8
Info title Pro Tip Set your base DB params in your parameters.yml
/parameters.yml.dist
and refer them here.Code Block title parameters.yml parameters: database_driver: pdo_mysql database_host: localhost database_port: 3306 database_name: ezdemo database_user: my_user database_password: my_password database_charset: UTF8
Code Block title ezpublish.yml / config.yml doctrine: dbal: connections: my_connection: driver: %database_driver% host: %database_host% port: %database_port% dbname: %database_name% user: %database_user% password: %database_password% charset: %database_charset%
Define one or several repositories
Code Block title ezpublish.yml ezpublish: repositories: main: { engine: legacy, connection: my_connection }
(Optional) Make your SiteAccess config point to the right repository
Code Block title ezpublish.yml collapse true ezpublish: system: my_siteaccess_group: repository: main
Info title Remove the old connection information Note : to benefit from the new configuration, don't forget to remove the old configuration
Code Block title Old database access to remove ezpublish: system: my_siteaccess_group: database: type: mysql user: my_user password: my_password server: localhost database_name: ezdemo
...
Code Block |
---|
_ezpublishRestOptionsRoutes:
resource: "@EzPublishRestBundle/Resources/config/routing.yml"
prefix: %ezpublish_rest.path_prefix%
type: rest_options
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.xml"
login:
path: /login
defaults: { _controller: ezpublish.security.controller:loginAction }
login_check:
path: /login_check
logout:
path: /logout |
...
Code Block |
---|
security: firewalls: ezpublish_front: pattern: ^/ anonymous: ~ form_login: require_previous_session: false logout: ~ |
ezpublish/config/parameters.yml.dist
If you have added anything to parameters.yml
, we suggest that you add your custom settings to parameters.yml.dist
, so that the composer post-update script handles those, and generates their values correctly.
ezpublish_legacy.default.view_default_layout can be removed from this file, and the following added:
Code Block |
---|
parameters: mailer_transport: smtp mailer_host: 127.0.0.1 mailer_user: ~ mailer_password: ~ |
composer will ask for your own values when you run composer update.
...
Code Block |
---|
stash: caches: default: drivers: |
ezpublish.system.<siteAccessName>.session_name
has been deprecated for defining session name. You now need to use ezpublish.system.<siteAccessName>.session.name
.
Before:
Code Block |
---|
ezpublish: system: my_siteaccess: session_name: SomeSessionName |
After:
Code Block |
---|
ezpublish: system: my_siteaccess: session: name: SomeSessionName |
...
If you had modified composer.json
to add your own requirements, you must re-apply those changes to the new version, and run composer update
.
Varnish (if applicable)
The recommended varnish (3 and 4) VCL configuration can now be found in the doc/varnish
folder. See also the Using Varnish page.
...
Read more on the Web servers page.
Step 5: Run composer update
Run composer update --no-dev --prefer-dist
to get the latest eZ Publish dependencies.
At the end of the process, you will be asked for values for the parameters previously added to parameters.yml.dist
.
Step 6: Regenerate the autoload array for extensions
To regenerate the autoload array, execute the following script from the root of your eZ Publish Legacy directory:
Code Block |
---|
cd ezpublish_legacy php bin/php/ezpgenerateautoloads.php --extension |
Step
...
7: Link assets
Assets from the various bundles need to be made available for the webserver through the web/ document root.
...
Code Block |
---|
php ezpublish/console assets:install --symlink php ezpublish/console ezpublish:legacy:assets_install --symlink php ezpublish/console assetic:dump --env=prod |
Step
...
8: Clear the caches
Whenever an eZ Publish solution is upgraded, all caches must be cleared in a proper way. This should be done from within a system shell:
Navigate into the new eZ Publish directory.Run the script using the following shell command:cd /<ezp5-root>/ezpublish_legacy/php bin/php/ezcache.php --clear-all --purgePurging ensures that the caches are physically removed. When the "--purge" parameter is not specified, the caches will be expired but not removed.
Note: Sometimes the script is unable to clear all cache files because of restrictive file/directory permission settings. Make sure that all cache files have been cleared by inspecting the contents of the various cache sub-directories within the "var" directory (typically the "var/cache/" and "var/<name_of_siteaccess>/cache/" directories). If there are any cache files left, you need to remove them manually.
Step
...
9: Upgrade Extensions (site package)
Next, depending on if you originally installed eZ Flow, eZ Webin or eZ Demo site, follow the steps mentioned in the eZ Webin, eZ Flow or eZ Demo upgrade documentation.
Minor Versions Update Warning
Please have in mind that, after the upgrade to a major version of eZ Publish, you will need to perform regular updates with composer.
Before any minor update with composer, please execute all require steps described in the 5.4.x Update Instructions.