How to apply Magento patches

Posted by Damodar Bashyal on July 13, 2015

 

This should work on both versions of Magento "community and Enterprise".

This is how I apply patch locally:

~/ee14$ bash PATCH_SUPEE-6285_EE_1.14.2.0_v1-2015-07-06-08-03-03.sh

But whenever I try to apply magento patch I get this message:

Checking if patch can be applied/reverted successfully...

ERROR: Patch can't be applied/reverted successfully.

checking file app/Mage.php

Hunk #1 FAILED at 814 (different line endings).

1 out of 1 hunk FAILED

checking file app/code/community/OnTap/Merchandiser/controllers/AdminhtmlController.php

Hunk #1 FAILED at 385 (different line endings).

1 out of 1 hunk FAILED

checking file app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php

Hunk #1 FAILED at 84 (different line endings).

1 out of 1 hunk FAILED

So, I copy all file names and run dos2unix command to convert all line endings to unix from dos as command says:

~/ee14$ dos2unix <filename>

e.g.

~/ee14$ dos2unix app/code/community/OnTap/Merchandiser/controllers/AdminhtmlController.php
~/ee14$ dos2unix app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php

So, after that update, I can easily apply patch to the branch I am working with and commit changes and deploy to production after test.

~/ee14$ bash PATCH_SUPEE-6285_EE_1.14.2.0_v1-2015-07-06-08-03-03.sh

Checking if patch can be applied/reverted successfully...

Patch was applied/reverted successfully.

Magento apply security patch

Feel free to suggest the way you apply magento security patches.

Jones Wilson posted on - Thursday 21st of July 2016 11:35:02 PM

As a Magento developer, it's a awesome information. I would love to share it with my friends. Thanks for sharing it.
 
not published on website


QR Code: How to apply Magento patches