Preparing for Magento Upgrades, Patches, and Improvements

Preparing for Magento Upgrades, Patches, and Improvements

When looking to make changes to your store such as installing security patches, themes, importing products, or module removal/installation, it is important to take measures to aid recovery in the event that things go wrong.

Here at the Alpha Hosting office, our technical team takes the following steps to prepare a client site when we install Magento security patches (at client request):

  1. Verify disk space is available for a backup
  2. Backup the site database
  3. Backup the current site content (all files needed for the site)
  4. Safeguard backup files: Verify the backup files are not in a place where they could be accidentally deleted
  5. Place the site into maintenance mode

 

These quick and easy steps can save you a lot of time and money when working on your site in case a procedure fails! If you find that you do not have space (or are uncertain if you do), please let our team know and we can review your account.

Your team may implement these procedures as well by following these steps:

  1. Ensure you have SSH access to the account you wish to backup, and know their location. If you do not have SSH access or are unsure where the files are located, please open a support ticket or call and our team can assist.
  2. Locate the database credentials for the installation. You will need the current database, database host, password, and username from these files.
    • Magento 1: {install_dir}/app/etc/local.xml
    • Magento 2: {install_dir}/app/etc/env.php
  3. Create a directory where you can store backups under your home directory. The following commands will accomplish this:
    1. Change directory to user home- cd ~/
    2. Create backup directory- mkdir $(date ‘+%d-%b-%Y’)_backup
    3. Change directory to backup directory- cd $(date ‘+%d-%b-%Y’)_backup
  4. Now it’s time to make the database backup. With the host, username, password, and database information in hand, the following step will create a backup in the your current backup directory!
    • Fill each entry wrapped in quotations with your own credentials, for security purposes, please do not type your password inline in the command -mysqldump -h”localhost” -u”username” -p “databasename” > $(date ‘+%d-%b-%Y’)_databasename.sql
  5. Finally we will backup the site files for your store! From the backup directory, run the following command – Note that your file path may be different, so please verify you are selecting the proper file path!
    • tar -zvcf $(date ‘+%d-%b-%Y’)_PreChangeSite1.tar.gz ~/public_html/

Once all commands complete successfully, you will have a backup directory in your users’ home which should not be impacted from any changes made.

If at any step you run into an issue or have questions, please do not hesitate to let our Support Team know. Our technicians will assist in the event of a problem!

Questions? Contact our sales team for help!