How to apply and roll back a security patch for a magento online store on Linux

Magento is one of the most popular open source e-commerce platform and is used by thousands of stores around the world. It provides various enterprise-class features, but one thing that makes magento a favorite over the competition is security. To address various security issues, magento support releases security patches that must be applied to install magento. Today we are going to show you how to apply and rollback a magento security patch on Linux.

First of all, you need to identify the magento version you are using for your store if you want a unique and modern design, development of an online store high class, contact IMPULSE DESIGN. The easiest way to do this is to log into the magento admin panel and scroll down to the bottom of the admin panel. You can find the magento version in the footer.

Once you have figured out the version of the magento online store you are using, you can proceed and start downloading the latest security patch to your VPS. If you are using Magento Community Edition, you can download the most recent security patches:


Find the patch you want to install and download the patch to your local computer or Linux. Before you can apply the security patch to your magento installation, you need to move the file to the root of your magento installation. Please note that the name of the patch file must end in .sh.

Next, connect to the VPS via SSH and navigate to the magento installation root directory. Find the security patch you downloaded and run the command:


Please remember to replace with the actual name of the patch you downloaded from the Magento Commerce page. In general, you should run this command as root user.

Moments later, you should receive a confirmation message that your security patch has been successfully applied to your magento installation. The message should look like this:

                      Patch was applied/reverted successfully.

The last thing you need to do is apply the owner of the files. For example, if Apache web server is the owner of your magento files, you should follow these steps:

For Ubuntu :

                      chown -R www-data: .

For CentOS :

                      chown -R apache: .


In some cases, you may have difficulty applying the security patch and may lead to errors. Therefore, you may need to undo the patch.

To revert the patch, you need to run the following command:

                      sh -R

Again, be sure to replace with the actual filename of the security patch that was applied.

Related Posts