Magento 1.9.x Module upgrade via command line (CLI)

Magento 1.9.x will receive updates until June 2020. In this context you should not forget the modules. There can be patches for security holes, useful feature updates or other necessary updates.

Magento 1.9.x will receive updates until June 2020. In this context you should not forget the modules. There can be patches for security holes, useful feature updates or other necessary updates.
In the following example I update the Amazon Payments EU module from version 2.0.0 to 3.0.6.

ATTENTION: With this solution I uninstall the module, otherwise no upgrade would be possible. This can be problematic, if the module provides uninstall routines, which e.g. delete the module's tables from the database.
This has to be checked in detail for each module. In this example this is not a problem, because the module was not used in the prior installed version.
In general it is advisable to create a backup before each update.

At first I try to upgrade the module the normal way:

 

$ ./mage upgrade community Creativestyle_AmazonPayments

 

Unfortunately what it does not find any newer version:

 

Checking dependencies of packages
Already installed: community/Creativestyle_AmazonPayments 2.0.0, skipping

 

So I download the newest version from Magento Marketplace and move it to Downloader Cache on the server:
marketplace.magento.com/creativestyle-creativestyle-amazonpayments.html

 

$ mv creativestyle-Creativestyle_AmazonPayments-3.0.6.tgz /var/www/example.com/web/downloader/.cache/community

 

Afterwords I uninstall the old version of the module, add a channel alias and install the new version:

 

$ ./mage uninstall community Creativestyle_AmazonPayments
$ ./mage install-file downloader/.cache/community/creativestyle-Creativestyle_AmazonPayments-3.0.6.tgz
# install-file: The '3eSheCmYonQYiVN3LDtmmkefvFfoNKe99' channel is not installed. Please use the MAGE shell script to install the '3eSheCmYonQYiVN3LDtmmkefvFfoNKe99' channel.
$ ./mage channel-alias community 3eSheCmYonQYiVN3LDtmmkefvFfoNKe99
$ ./mage install-file downloader/.cache/community/creativestyle-Creativestyle_AmazonPayments-3.0.6.tgz

 

Unfortunately I can't tell why the module from the Magento Marketplace entered an ID as channel. Here I assume that the Magento Marketplace links the module to my user account.
Anyway, the first time I try to install it, I get the message that the channel with the ID does not exist. My solution here is to set the ID as channel alias for the channel community.

After that the module can be installed without any problems.

Finally the cache should be emptied. If you were logged in in the backend, it is usually advisable to log out and in again.

 

Comments and Responses

×

Name is required!

Enter valid name

Valid email is required!

Enter valid email address

Comment is required!

Captcha Code Can't read the image? Click here to refresh

Captcha is required!

Code does not match!

* These fields are required.

Be the First to Comment