How To Apply A Magento Patch
Download the Patch
Patches from Magento are given names like SUPEE-7616, SUPEE-6788, etc. Each patch will have several formats. These formats created so that the patch can be applied to different versions of Magento.
To find the correct patch you need to know its name and the version of Magento that you have installed. The easiest way to determine your Magento version is to log into your admin panel and look in the footer.
Now head over to Magento's Community Edition download center. Click on the Release Archive tab and locate patch by name in the Magento Community Edition Patches section.
You'll see a list of all available formats. Select the format that fits your Magento Version.
Click the download button next to the format selector. You will be prompted to login or create an account if you haven't already.
Apply the Patch
We recommend applying the patch in an offline/staging environment, then deploying to your production server(s).
You will need some basic understanding of how to use the command line/bash terminal.
Start by moving the patch from its downloaded location to the root of your Magento application. For example:
mv ~/Downloads/PATCH_SUPEE-5345_CE_188.8.131.52_v1-2015-02-10-08-11-22.sh /var/www/html/magento/
Then navigate (in terminal) to the root of your Magento application and use
sh <PATCH NAME> to apply the patch.
You should see the message "Patch was applied/reverted successfully."
After applying the patch, test your site like you would when installing a new module. If everything passes, deploy the changed files to your production server.
If when applying the patch you received an error message, check the following:
- Verify you downloaded the correct patch for your Magento version
Check the downloads page for installation instructions. Some patches require you to install previous patches first.
- If you're still having problems, check with your developer to see if any modifications have been made to the Magento core (other than from official Magento patches). They will need to be reverted before the patch can be applied correctly.