Documentation Home »Installation Guide »Upgrade OroCommerce to the Newer Version
current version

Upgrade OroCommerce to the Newer Version

Upgrade OroCommerce

To retrieve a new version and upgrade your OroCommerce instance, please execute the following steps:

  1. cd to the OroCommerce root folder and switch the application to the maintenance mode.
$ cd /path/to/application
$ sudo -uwww-data app/console lexik:maintenance:lock --env prod
  1. Stop the cron tasks.

    $ crontab -e -uwww-data


    The www-data may be replaced with the user under which your web server runs.

    Comment this line.

    */1 * * * * /usr/bin/php /path/to/application/app/console --env=prod oro:cron >> /dev/null
  2. Stop all running consumers.

  3. Create backups of your Database and Code.

  4. Pull the changes from the necessary application repository (e.g. or download the latest OroCommerce version from the download section on the , unpack archive and overwrite existing system files.


    If you have any customization or third party extensions installed, make sure that:
    • your changes to “app/AppKernel.php” file are merged to the new file.
    • your changes to “src/” folder are merged and it contains the custom files.
    • your changes to “composer.json” file are merged to the new file.
    • your changes to configuration files in “app/config/” folder are merged to the new files.
    $ sudo -uwww-data git pull
    $ sudo -uwww-data git checkout <VERSION TO UPGRADE>
  5. Upgrade the composer dependency and set up the right owner to the retrieved files.

    $ sudo php composer.phar install --prefer-dist --no-dev
    $ sudo chown www-data:www-data -R ./*
  6. Remove old caches.

    sudo rm -rf app/cache/*
    sudo rm -rf web/js/*
    sudo rm -rf web/css/*
  7. Upgrade the platform.

    $ sudo -u www-data php app/console oro:platform:update --env=prod --force
  8. Remove the caches.

    $ sudo -u www-data app/console cache:clear --env prod

    or, as alternative:

    $ sudo rm -rf app/cache/*
    $ sudo -u www-data app/console cache:warmup --env prod
  9. Run the consumer(s).

    $ sudo -u www-data app/console oro:message-queue:consume --env prod
  10. Enable cron.

    $ crontab -e -uwww-data

    Uncomment this line.

    */1 * * * * /usr/bin/php /path/to/application/app/console --env=prod oro:cron >> /dev/null
  11. Switch your application back to normal mode from the maintenance mode.

    $ sudo -uwww-data app/console lexik:maintenance:unlock --env prod


    If PHP bytecode cache tools (e.g. opcache) are used, PHP-FPM (or Apache web server) should be restarted after the uprgade to flush cached bytecode from the previous installation.

Browse maintained versions: