Tag Archives: wget

Magento Wget Download

If you use Linux servers, are working with Magento, and want to download the latest version or patches then the Magento site is not as friendly as you might want.

The download process is java driven and does not provide a link for the download, just a browser based download to your local computer.

I work mobile a lot and I do not want to download 22Mbyte files to my notebook over 3G and then have to upload from my notebook to the server. It is just a waste of time and bandwidth.

So I went searching for the path that we need to use and for the latest tar.gz file for magento this is what works.

http://www.magentocommerce.com/downloads/assets/1.9.1.0/magento-1.9.1.0.tar.gz

From what I can see, and assuming that they do not change the process, http://www.magentocommerce.com/downloads/assets/ followed by the version number as a directory, and then the file name should provide a full download path.

In this case this combo downloaded the latest release for me to my Linux server.

[text]
# wget http://www.magentocommerce.com/downloads/assets/1.9.1.1/magento-1.9.1.1.tar.gz
[/text]

A word of warning!

When extracting the tar.gz file, Magento do not provide a unique version path for the contents. All versions use the root path of ‘magento’ so assuming you always download to the same path you may have magento-1.9.1.0.tar.gz right alongside magento-1.9.1.1.tar.gz and extracting the newer version will extract it into the magento directory over the top of existing magento directory. The result of this is that your new version is potentially saddled with artifacts from the earlier version. Delete the magento directory and start again.

A 4 step process could be:

1. Clean up from previous downloads

[text]
#rmdir magento // or // #rm -Rf magento
[/text]

2. wget the new version

[text]
# wget http://www.magentocommerce.com/downloads/assets/1.9.1.1/magento-1.9.1.1.tar.gz
[/text]

3. Prepare a directory ready for the extract of the new version

[text]
#mkdir magento-1.9.1.1
[/text]

4. and finally extract the file contents from the tar.gz file, into the stated directory, and strip the first directory from the path that is stored within the archive, i.e. /magento/

[text]
#tar zxvf magento-1.9.1.1.tar.gz -C magento-1.9.1.1 –strip-components=1
[/text]

Next, carry on as usual with your backup existing, copy the new files, etc, etc.