WebCitz Blog

Upgrade to Magento via SSH

This Magento upgrade tutorial will help guide you through the process of updating / upgrading your Magento installation from 1.4+ to which was released on Oct 27, 2015. For the purpose of this tutorial, we will assume you have access to SSH on your hosting account. You should always create a backup of your entire website/database before proceeding with an upgrade and never perform these steps on a live store. Please be sure to obtain updated files from the authors of any Magento extensions you have installed on your website.

NOTE: This update includes SUPEE-5344, SUPEE-5994, SUPEE-6237, SUPEE-6285, SUPEE-6482, SUPEE-6788.

  1. Change to your Magento installation directory:
    (swap “username” below for your account’s username, or change the entire path to match your absolute URL)

    cd /home/username/public_html
  2. Download Magento from https://www.magentocommerce.com/download
    You can select tar.gz or zip for an archive format.
  3. Upload the archive to the base folder of your Magento installation
  4. Extract the archive:
    tar -zxvf magento-
    unzip magento-
  5. Change to the directory created during extraction:
    cd magento
  6. Turn off file replacement prompts:
    unalias cp
  7. Copy the Magento files over your existing files:
    cp -rf * ../
  8. Change back to your Magento installation directory:
    cd ..
  9. Remove the empty folder
    rm -rf magento
  10. Optional: CHMOD all files to 644:
    find -type f -name ‘*.*’ -exec chmod 644 {} \;
    Optional: CHMOD all folders to 755:
    find -type d -exec chmod 755 {} \;
    Optional: CHOWN all files/folders:
    chown -R username:username *