How to upgrade Magento with the “diff file” method?

Note that the “diff file” method did not work out for me: some patches were applied in a bad manner (“offset of xxx lines detected” etc., in effect appending it to the file …) and so for example the Magento Connect manager did not work any more because its PHP source got mangled. Therefore, I cannot recommend updating by patching. Instead, follow another one of the Magento upgrading methods. If you download and install a full new version, this will of course force you to re-apply your local changes to Magento code.

However, if you still want to try the diff file method:

  1. Download the diff files you need from magentocommerce.com/download/diff
  2. Clear the cache: rm -rf var/cache/*
  3. Decompress the diff ball to your magento root.
  4. Use the following patch command to apply the diff patches:

    patch -p0 -f < 1.4.0.1-1.4.1.0.diff

    Here, the -f switch means “force”, which will not ask you if you think the patch is “reversed” (created with the parameters of diff erroneously swapped). Magento patches are never reversed …

Source: Magento Wiki: Upgrading Magento: Using SSH Shell Access


Posted

in

,

by

Tags:

Comments

One response to “How to upgrade Magento with the “diff file” method?”

  1. Jason Huebel

    This doesn’t appear to work anymore. If you use the diff upgrade method, you should use the following command line:

    patch -p1 -f < patchfile.diff

    Note that -p1 is used, instead of -p0. This strips the “a/” and “b/” subfolders from the paths in the patch file.

    Current as of 1.9.3.7.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.