I have multiple Magento websites with different versions (, and in multiple servers. Is there any more easy and painless way other than ssh into each server separately and apply the patch files?

  • Hi Pedram, You can't do it from single file execution because your websites are located on different server. I think installing a security patch using SSH is the best and painless way as compare to any other processes. – Praful Rajput Aug 18 '15 at 5:54
  • Thanks, but I think there should be a better way, cause everyone wants to be DRY not WET :) – Pedram Behroozi Aug 18 '15 at 6:07
  • If you are using VCS (version control system). Then you can create a updated files zip with directory path using command git ls-files --modified | xargs -i cp {} ~/tmp and you can overwrite this folder to your website. – Praful Rajput Aug 18 '15 at 7:03
  • 1
    I think the pain caused by a failed automatic update process across multiple live shops would vastly outweigh the 5 minute pain of applying a patch manually. – paj Aug 18 '15 at 7:18

Depends on your deployment process but you will have to apply each patch at least once per Magento version because the patch files are different from version to version.

A possible approach is to install Magento with composer from a single "Magento Core" Git repository. This repository should have one branch per version (,, and so on), so that you can apply patches for each Magento version.

Example branch structure:

* 59eba08 init Magento (tag:, origin/ce-, ce-
| * d4c0a85 (tag:, origin/ce-, ce- PATCH_SUPEE-6285
| * 5bedc45 PATCH_SUPEE-5994 (tag:
| * 8147f19 PATCH_SUPEE-5344 (tag:
| * 2c73257 PATCH_SUPEE-4829 (tag:
| * e8916e5 Init Magento CE (tag:
* ba94c8b (origin/master, master) Initial commit (only composer.json)

Then apply the patch on the branch of each Magento version that you are actively using and run composer update magento/ce (or similar) on each installation.

The tagging format x.x.x.x-patchXXXX is important, so that composer understands the versions (See: https://getcomposer.org/doc/02-libraries.md#specifying-the-version). require: { "magento/ce":""} will install the tag with the highest -patch suffix.

  • 1
    Great. I'm using Composer and I was trying to figure out a way to apply patches using this approach. I'll definitely try your advise. – Pedram Behroozi Aug 18 '15 at 9:07
  • 3
    Recently I wrote blog post on the same topic - razbakov.com/blog/install-magento-via-composer – Aleksey Razbakov Aug 19 '15 at 5:52
  • Thanks for adding the link to your post. Alekeyi +1 informative! – Bryan 'BJ' Hoffpauir Jr. Aug 24 '15 at 22:03
  • Fabian, thanks for that link - I had hit a wall with my understanding of how Composer handled the resolution of versioning with patches in a standard way. Semantic Versioning #FTW – Bryan 'BJ' Hoffpauir Jr. Aug 24 '15 at 22:05

No - according to my knowledge you'll need to execute the patches manually. Better test the patches and make sure your website's functionality remains intact...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.