{"id":692,"date":"2013-06-27T08:14:09","date_gmt":"2013-06-27T08:14:09","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=692"},"modified":"2013-06-27T08:14:09","modified_gmt":"2013-06-27T08:14:09","slug":"magento-installing-extensions-via-command-line","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/magento-installing-extensions-via-command-line\/","title":{"rendered":"Magento – Installing Extensions via Command Line"},"content":{"rendered":"
<\/p>\n
I don’t like the idea of having to change permissions of my magento install to add on new extensions. There’re some services that allow you to download extension in compressed file like http:\/\/freegento.com\/ddl-magento-extension.php , so you will only need to extract then copy&paste to your Magento installation folder, this is also a pain to me, especially when i’m on a Mac (yes, Mac is bad at merging files) . Thanks to Magento, we have command line for this type of work.<\/p>\n
<\/p>\n
So here is how to do via Terminal (shell, ssh, or whatever \u2026). Make sure you know how to use terminal and type command properly .<\/p>\n
Firstly, navigate to base magento directory<\/p>\n
\ncd \/path\/to\/your\/magento\/directory\n<\/pre>\nThen you may need to install connect20 community channel<\/p>\n
\n.\/mage mage-setup\n.\/mage -V\n.\/mage list-channels\n<\/pre>\nFrom this point, we have 2 options to install extension, locally or via community channel<\/p>\n
\n.\/mage install <channelName> <packageName>\n# install using compressed extension\n.\/mage install-file <path\/to\/file>\n<\/pre>\nfor example<\/p>\n
\n# install from channel\n.\/mage install connect20.magentocommerce.com\/community Nexcessnet_Turpentine\n# install locally\n.\/mage install-file ~\/Downloads\/Ves_MiniCart-1.1.0.tgz\n<\/pre>\nYou can get packageName by clicking on ‘Install now’ button, then get extension key of Magento Connect 2.0, you will have a url like this :
\nhttp:\/\/connect20.magentocommerce.com\/community\/Nexcessnet_Turpentine
\nPackage name is last part of URL, in this case we have Nexcessnet_Turpentine<\/p>\nFinally, you should do a chown -R on your directories to whatever your\u2019s is (visit this post<\/a>) , otherwise they may have root:root<\/p>\n
I was running this on magento 1.6 using version 2.0 of magento connect to get the extension info.<\/p>\n","protected":false},"excerpt":{"rendered":"
I don’t like the idea of having to change permissions of my magento install to add on new extensions. There’re some services that allow you to download extension in compressed file like http:\/\/freegento.com\/ddl-magento-extension.php , so you will only need to extract then copy&paste to your Magento installation folder, this is also a pain to me,…<\/p>\n