Skip over navigation
Documentation
You are currently viewing documentation for version 3.0 which is not a long-term support release. The latest long-term support release is version 1.6

How to Upgrade to a New Version

1. Checkout from the GitHub Repository

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.
1
2
      cd /path/to/application
      sudo -u www-data bin/console lexik:maintenance:lock --env=prod
  1. Stop the cron tasks.
1
      crontab -e -u www-data

Note

www-data can be changed to user under which your web server runs

Comment this line.

1
     */1 * * * * /usr/bin/php /path/to/application/bin/console --env=prod oro:cron >> /dev/null
  1. Stop all running consumers.
  2. Create backups of your Database and Code.
  3. Pull changes from the repository.

Note

If you have any customization or third party extensions installed, make sure that:
  • your changes to “src/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 “config/” folder are merged to the new files.
1
2
      sudo -u www-data git pull
      sudo -u www-data git checkout <VERSION TO UPGRADE>
  1. Upgrade the composer dependency and set up the right owner to the retrieved files.
1
      sudo -u www-data php composer.phar install --prefer-dist --no-dev
  1. Remove old caches.
1
      sudo rm -rf var/cache/prod
  1. Upgrade the platform.
1
      sudo -u www-data php bin/console oro:platform:update --env=prod

Note

To speed up the update process, consider using –schedule-search-reindexation or –skip-search-reindexation option:

  • –schedule-search-reindexation — postpone search reindexation process until the message queue consumer is started (on step 12 below).
  • –skip-search-reindexation — skip search reindexation. Later, you can start it manually using the oro:search:reindex and oro:website-search:reindex commands. See Search Index: Indexation Process.
  1. Remove the caches.
1
      sudo -u www-data bin/console cache:clear --env=prod

or, as alternative:

1
2
      sudo rm -rf var/cache/prod
      sudo -u www-data bin/console cache:warmup --env=prod
  1. Enable cron.
1
      crontab -e -u www-data

Uncomment this line.

1
     */1 * * * * /usr/bin/php /path/to/application/bin/console --env=prod oro:cron >> /dev/null
  1. Switch your application back to normal mode from the maintenance mode.
1
      sudo -u www-data bin/console lexik:maintenance:unlock --env=prod
  1. Run the consumer(s).
1
       sudo -u www-data bin/console oro:message-queue:consume --env=prod

Note

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.

2. Download the Source Code Archive

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.
1
2
      cd /path/to/application
      sudo -u www-data bin/console lexik:maintenance:lock --env=prod
  1. Stop the cron tasks.
1
      crontab -e -u www-data

Note

www-data can be changed to user under which your web server runs

Comment this line.

1
    */1 * * * * /usr/bin/php /path/to/application/bin/console --env=prod oro:cron >> /dev/null
  1. Stop all running consumers.
  2. Create backups of your Database and Code.
  3. Download the latest OroCommerce version from the download section on the oroinc.com/orocommerce , unpack archive and overwrite existing system files

Note

If you have any customization or third party extensions installed, make sure that:
  • your changes to “src/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 “config/” folder are merged to the new files.
  • upgrade the composer dependency and set up right owner to the retrieved files.
sudo -u your_user_for_admin_tasks php composer.phar update --prefer-dist --no-dev
  1. Remove old caches.
1
      sudo rm -rf var/cache/prod
  1. Upgrade the platform.
1
      sudo -u www-data php bin/console oro:platform:update --env=prod
  1. Remove the caches.
1
      sudo -u www-data bin/console cache:clear --env=prod

or, as alternative:

1
2
      sudo rm -rf var/cache/prod
      sudo -u www-data bin/console cache:warmup --env=prod
  1. Enable cron.
1
      crontab -e -u www-data

Uncomment this line.

1
    */1 * * * * /usr/bin/php /path/to/application/bin/console --env=prod oro:cron >> /dev/null
  1. Switch your application back to normal mode from the maintenance mode.
1
      sudo -u www-data bin/console lexik:maintenance:unlock --env=prod
  1. Run the consumer(s).
1
      sudo -u www-data bin/console oro:message-queue:consume --env=prod

Note

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:3.01.6

You will be redirected to [title]. Would you like to continue?

Yes No
sso for www.magecore.comsso for oroinc.desso for oroinc.fr
Back to top