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

    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

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

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

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

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