Home » Magento4 December 2017

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

This article shows how you can upgrade/update 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 and packages 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 package. 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) Check Compilation & Disable it if Enabled

You can run the following command to see the available options for compilation:

Output:

So, to check the status of the compilation, we run the following command:

If the Compiler Status is Disabled then you can move on to the next step.

If the Compiler Status is Enabled then you have to disable it with the following command:

5) Give write permission to all Magento files and folders

6) 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.

7) List all the available commands with mage script

Output:

8) Change config settings to stable

9) List all installed packages in your Magento site

Output:

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

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

Output:

The above output shows that most of the packages 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.

12) Upgrade all packages

OR,

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

14) Then, clear cache and session again.

15) Enable Compilation only if it was Enabled before upgrade

Check step 4) above.

If Compilation was not enabled in step 4) then you can skip this step and go to next step.

If Compilation was enabled for your website and you had disabled it at step 4) then you have to Enable it with the following command:

16) 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

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

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

19) 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

Comments are closed.