Using Magento command line download tool
Magento provides downloads at https://magento.com/tech-resources/download - but this resource is both protected by a login wall and not possible to be accessed by command line. A frequent task of any Magento store owner is to be able to quickly and confidently download resources from Magento direct to their store.
So that's why we wrote MDA (Magento download archive), where you can download full Magento CE & EE releases along with identifying and downloading missing patches; all with great ease by command line.
Using MDA
You can find the GitHub project for MDA here, https://github.com/sonassi/magento-download-archive where it currently supports the download of,
- CE Full releases
- CE Patches
- EE Full releases
- EE Patches
You need only download the phar (PHP archive) and execute it with PHP to use it.
Download the application,
wget -O mda.phar --no-check-certificate https://raw.githubusercontent.com/sonassi/magento-download-archive/master/bin/mda.phar
Launch MDA,
php mda.phar
Then pick the appropriate option from the menu,
Downloadable types
--
[0]: Ce-full
[1]: Ce-patch
[2]: Ee-full
[3]: Ee-patch
[4]: Other
[q]: Quit
Setting custom id/token for personalised downloads
If you are a Magento EE subscriber, or simply want to use your own id/token for downloads, you can do so using the following options.
The application supports the following long options,
--id
Your Magento ID, found in your My Account section on the top left hand side.--token
Your Magento Token, found in your Access Token section.
Examples
Downloading Magento CE
Change to your Magento document root, download and run the script,
cd /microcloud/domains/example/domains/example.com/http
wget -O mda.phar --no-check-certificate https://raw.githubusercontent.com/sonassi/magento-download-archive/master/bin/mda.phar
php mda.phar
Select option 0,
[0]: Ce-full
Select a valid option: 0
Then pick the respective release (I want 1.9.3.4
),
[19]: 1.9.3.4
Select a valid option: 19
Then pick the appropriate variant (I want the tar.gz
archive),
[1]: magento-1.9.3.4.tar.gz
Select a valid option: 1
The file will be downloaded in a directory called downloads
.
Downloading missing patches for Magento CE
Change to your Magento document root, download and run the script,
cd /microcloud/domains/example/domains/example.com/http
wget -O mda.phar --no-check-certificate https://raw.githubusercontent.com/sonassi/magento-download-archive/master/bin/mda.phar
php mda.phar
Select option 1,
[1]: Ce-patch
Select a valid option: 1
Then pick the respective release, the script auto-detects this,
[0]: 1.7.0.2 (auto detected)
Select a valid option: 0
Then pick option m
to download all missing patches,
[0]: Missing SUPEE-5344 - Magento-CE-v1.7.x
[1]: Installed SUPEE-1533 - Magento-CE-v1.7.x
[2]: Installed SUPEE-5994 for CE 1.6.0.0 - 1.9.1.1
[3]: Missing USPS API Patch - SUPEE-6237 - CE 1.6.x-1.9.1.x
[4]: Installed SUPEE-6285 for CE 1.7.0.0 - 1.7.0.2
[5]: Installed SUPEE-6482 for CE 1.7.x - 1.8.0.0
[6]: Installed SUPEE-6788 for CE 1.7.0.2
[7]: Installed SUPEE-7405 for CE 1.7.0.0-1.7.0.2
[8]: Installed SUPEE-7616 for CE 1.4.2.0 - 1.7.0.2
[9]: Installed SUPEE-7405 v1.1 for CE 1.7.0.2
[10]: Installed SUPEE-8788 for CE 1.7.0.2
[11]: Installed SUPEE-9652 for CE 1.5.0.1-1.9.3.1
[12]: Missing SUPEE-8967 for CE 1.5.0.0-1.9.2.4
[13]: Missing SUPEE-8167 for CE 1.7.0.1-1.7.0.2
[14]: Installed SUPEE-9767 for CE 1.7.0.0-1.7.0.2
[15]: Missing SUPEE-9767v2 for CE 1.7.0.0-1.7.0.2
[m]: All missing patches
Select a valid option: m
All missing patches will be downloaded in a directory called downloads
.
Downloading Magento EE Releases and Patches
Change to your Magento document root, download and run the script,
cd /microcloud/domains/example/domains/example.com/http
wget -O mda.phar --no-check-certificate https://raw.githubusercontent.com/sonassi/magento-download-archive/master/bin/mda.phar
Execute MDA including the id and token options to access your Magento EE downloads,
php mda.phar --id=MAG001 --token=00001
And you'll be presented with the two additional options for Magento EE,