{"id":17542,"date":"2015-08-16T16:06:02","date_gmt":"2015-08-16T21:06:02","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17542"},"modified":"2022-07-15T05:08:38","modified_gmt":"2022-07-15T10:08:38","slug":"how-to-apply-and-revert-a-magento-security-patch-on-a-linux-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-apply-and-revert-a-magento-security-patch-on-a-linux-vps\/","title":{"rendered":"How to Apply and Revert a Magento Security Patch on a Linux VPS"},"content":{"rendered":"
Magento is one of the most popular open-source eCommerce platforms and it is used by thousands of merchants worldwide. It provides a variety of enterprise-class features, but one thing that makes Magento a favorite over its competition is the security. To resolve a variety of security issues, Magento support releases security patches that should be applied to the Magento installation. Today, we are going to show you how to apply and revert a Magento security patch on a Linux VPS<\/a>. Locate the patch you need to install and download the patch on your local machine or on your Linux VPS<\/a>. Before you can apply the security patch on your Magento installation, you need to transfer the file in your Magento installation root directory. Please note that the patch file name should end up with .sh.<\/p>\n Next, connect to your VPS via SSH<\/a> and navigate to your Magento installation root directory. Locate the security patch you have downloaded and execute the command:<\/p>\n Please do not forget to replace patch-name.sh with the actual name of the security patch you have downloaded from the Magento Commerce download page. In general, you should execute this command as root user. The last thing you need to do is to reapply the ownership of the files. For example, if the Apache web server user is the owner of you Magento files you should execute the following commands:<\/p>\n For Ubuntu VPS<\/a>:<\/p>\n For CentOS VPS<\/a>:<\/p>\n After completing this step, you are done. Again, do not forget to replace patch-name.sh with the actual name of the security patch you have applied.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS hosting<\/a> services, in which case you can simply ask our expert Linux admins to apply or revert the Magento security patch for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" Magento is one of the most popular open-source eCommerce platforms and it is used by thousands of merchants worldwide. It … <\/p>\n
\n
\nFirst of all, you need to determine the\u00a0Magento version you have been\u00a0using for your store. The easiest way to do this is to log in to your Magento Admin Panel and scroll down to the bottom of the Admin Panel. You can find the Magento version in the footer.
\nOnce you found out which\u00a0Magento version you are using, you need to proceed and download the latest security patch on your VPS. If you are using the Magento Community Edition, you can download the latest security patches from:<\/p>\nhttps:\/\/www.magentocommerce.com\/download<\/a><\/pre>\n
sh patch-name.sh<\/pre>\n
\nAfter few moments you should receive a confirmation message that your security patch has been successfully applied to your Magento installation. The message should look like\u00a0the following:<\/p>\nPatch was applied\/reverted successfully.<\/pre>\n
chown -R www-data: .<\/pre>\n
chown -R apache: .<\/pre>\n
\nIn some cases, you may experience difficulties with applying the security patch and it may result in\u00a0errors. Therefore, you may need to revert the patch. To revert the patch you need to execute the following command:<\/p>\nsh patch-name.sh -R<\/pre>\n