Home » Magento4 December 2017

Update/Upgrade Magento 1.x to Latest Version via both Browser & Command Line

This article shows how you can upgrade your Magento 1.x via both Browser GUI and Command Line.

Before upgrading, we first have to create backup of our Magento site’s files and database so that we can restore the backed up files and database if by any problem the upgrade process fails.

Upgrade Magento 1.x via Browser (Magento Connect Manager)

Backup files and database

Before upgrading, you have to backup your Magento site’s files and database. To backup files and database via Browser GUI, you have to login to Control Panel (Cpanel) of your webhost.

In Control Panel, you have:

File Manager menu from where you can backup files (i.e. make a compress/zipped copy of your files)
PHPMyAdmin menu from where you can export your database tables and data in SQL file or in Zipped file format

Upgrade Magento

Upgrading Magento 1.x via browser GUI is simple and easy. Here are the steps to follow:

1) Login to your Magento Admin.

2) Disable Cache (System -> Cache Management) and Compilation (System -> Tools -> Compilation).

3) Go to System -> Magento Connect -> Magento Connect Manager

a) If you see a Login Form then move to Step 3) below.

b) If you see 403 Forbidden error then:

– Go to your Magento files directory
– After that, go inside folder downloader
– The magento_root/downloader/.htaccess file contains the following part of code:

– Replace the above xx.xx.xx.xx with your IP address.
– You can get your IP address by simply googling what is my ip address.

4) Enter your Admin username and password, and click the Log In button.

5) After you login successfully, you will see the following page:

6) Click on the Check for Upgrades button present in that page.

7) After that, all the Magento modules that have available upgrade will be highlighted in yellow color like in below image:

8) Then, in the Action column, you can select the version to which you want to upgrade each module. You can select the latest version available in the select box.

9) After that, click on the Commit Changes button.

10) Then, it will take some time to complete the upgrade process.

11) After upgrade is complete, you can login to your Magento admin and enable Cache (System -> Cache Management) and Compilation (System -> Tools -> Compilation).

Upgrade Magento 1.x via Command Line

Backup files and database

Before upgrading, you have to backup your Magento site’s files and database. To backup files and database via Command Line, you have to follow the below steps:

1) Open Terminal/Command-prompt and Go to your Magento root directory with the following command:

2) Create files backup

3) Create database backup

When you run the above command, it will ask for your database password. Enter your database password and then your database will be exported in the GZ file format.

Upgrade Magento

Here are the steps to follow while upgrading Magento 1.x via command line:

1) Open Terminal/Command-prompt and Go to your Magento root directory with the following command:

2) Enable Maintenance mode for your Magento site

For this, you have to create an empty file named maintenance.flag in your Magento root directory.

3) Clear Cache & Sessions

4) Give write permission to all Magento files and folders

5) Give 550 permission mage file which is a shell script file. With 550 permission, we are just making the file non-writable + readable & executable by user and group only.

6) List all the available commands with mage script

Output:

7) Change config settings to stable

8) List all installed modules in your Magento site

Output:

9) Skip this step if you get the above output of installed modules. If the modules are not listed then you can run the following command:

10) If the modules are listed properly, then you can see the list of upgradable modules (i.e. modules that need an upgrade) by running the following command:

Output:

The above output shows that most of the modules are with version 1.9.1.0 and they can be upgraded to the latest version at the time of writing this article, which is 1.9.3.6.

11) Upgrade all modules

12) After completing the upgrade, we should reindex all data.

13) Then, clear cache and session again.

14) Before the upgrade, we have changed the permission of all files and folders to 777. You should also give proper permission to all files and folders of your Magento site.

– Convert files permission to 644 and folders permission to 755

– Give read-write full permission, i.e. 777 to var and media folders.

– Give 550 permission to mage shell script file

15) Check the versions of the installed modules. The modules should show latest version as they are already upgraded now.

16) List the upgradable modules (modules that need an upgrade). This should result in a message saying No upgrades available because all modules have been already upgraded to the latest version.

17) Disable Maintenance mode to make the site Live.

This will delete the file maintenance.flag and then the site will be live again.

You can now login to Magento admin and see the Magento version displayed in the footer section. It should show the latest version number.

Hope this helps. Thanks.

Magento

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed