Skip over navigation
Documentation
You are currently viewing documentation for a previously released version of OroCommerce. See the latest long-term support version.

How to Apply Patch

The patch file name supports the following naming convention: {package}-{version_to_apply}.patch. For example, platform-1.9.2.patch.

1. cd to the crm root folder and switch the application to the maintenance mode.

1
2
$ cd /path/to/application
$ sudo -u www-data app/console lexik:maintenance:lock --env=prod

2. 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/app/console --env=prod oro:cron >> /dev/null

3. Stop all running consumers.

4. Create backups of your Database and Code.

5. Copy the patch file to the package directory

1
/path/to/application/vendor/oro/{package}

So, the “platform-1.9.2.patch” file should be copied to /path/to/crm_folder/vendor/oro/platform.

6. To apply the patch, cd to the package folder and execute patch command.

1
2
$ cd /path/to/application/vendor/oro/{package}
$ patch -p1 < platform-1.9.2.patch

7. cd to crm root folder and clear caches.

1
$ cd /path/to/application

Remove the caches.

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

or, as an alternative:

1
$ sudo rm -rf app/cache/prod

8. Execute the oro:platform:update command and clear caches.

1
$ sudo -u www-data php app/console oro:platform:update --env=prod --force

Remove the caches.

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

or, as alternative:

1
2
$ sudo rm -rf app/cache/prod
$ sudo -u www-data app/console cache:warmup --env=prod

9. Run the consumer(s).

1
$ sudo -u www-data app/console oro:message-queue:consume --env=prod

10. Enable cron.

1
$ crontab -e -u www-data

Uncomment this line.

1
*/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.

1
$ sudo -u www-data bin/console lexik:maintenance:unlock --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.

ForumsForums
Back to top