Reference: 

https://support.hypernode.com/knowledgebase/how-to-apply-magento-patches/


Six steps to apply the patch and increase your Magento security



You need SSH (shell) access to download and apply the patch. You need only three commands, CD, WGET and BASH, to navigate, download and apply the patch.





Step 1: Make a backup



There’s a chance that certain plugins or elements in your webshop aren’t compatible with the Magento patch. That’s why we always recommend you to make a backup first, in case something goes wrong.





Step 2: Log on to SSH (shell)



Log on to the shell server. If you don’t how to log on, contact your hosting provider or technical contact. Byte customers can follow the steps in the article Inloggen op SSH (shell) (written in Dutch).





Step 3: Download the patch



To download the correct patch for your webshop you need to know what version of Magento your using. Don’t know what version you use? Find out using this tutorial. Byte customers can simply use the Magento monitor in their Service Panel to find out.



Download the patch(es) you need via the Magento downloads page.





Step 4: Apply the patch



The command BASH will apply the patch you just downloaded:



bash NAME_PATCH



Let’s assume here that the patch name is: patch_supee-5994.sh . Your actual command would look like this:



bash patch_supee-5994.sh





Step 5: Clear your cache



It’s important to flush the Magento cache after applying the patch. Flushing your caches can be done in the back-end of your Magento shop under Cache management. More info about flushing your cache in the back-end of Magento can be found in the Magentocommerce Knowledgebase. Don’t forget to flush your OPcode or APC cache as well!





Step 6: Check your shop



Don’t forget to check your shop for vulnerabilities after patching and flushing your caches. Magento’s Security Patch Page provides a list of signs to look out for to determine whether your site is comprised or not.