{"id":8968,"date":"2020-01-28T11:01:48","date_gmt":"2020-01-28T11:01:48","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=8968"},"modified":"2022-02-18T18:50:30","modified_gmt":"2022-02-18T13:20:30","slug":"how-to-install-magento-extension-from-command-line","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/","title":{"rendered":"How to Install Magento Extension from Command Line?"},"content":{"rendered":"<p>This article will guide you on how to use the mage script to manage Magento Connect extensions from the command line.<\/p>\n<h3># Brief about Mage Script<\/h3>\n<p>Magento incorporates the mage script that enables you to manage Magento Connect extensions.<\/p>\n<p>Mage script can be used in cron jobs and other types of automation tools because it is a command-line application.<\/p>\n<div style=\"background-color: #e0ffff; padding: 10px;\"><strong>Note:<\/strong> Magento 2 has a complete command-line interface. However, older versions of Magento don&#8217;t have a complete command-line interface administration solution.<\/div>\n<h3># Steps to configure the Mage script<\/h3>\n<p>Though mage script is incorporated with Magento by default, but it is not configured to run. Perform the following steps to configure the mage script :<\/p>\n<p>1) Using SSH login to your account.<\/p>\n<p>2) Enter following command in the command prompt &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">cd ~\/public_html\n\nchmod 700 mage<\/pre>\n<div style=\"background-color: #e0ffff; padding: 10px;\"><strong>Note:<\/strong> If you have installed Magento in a subdirectory under the public_html directory, then before running the chmod command change to that directory.<\/div>\n<p>3) Type following command to get all the available commands for the mage script &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage<\/pre>\n<h3># Listing of Magento Extensions<\/h3>\n<p>Enter the following command to view the extensions currently installed for your Magento site &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage list-installed<\/pre>\n<p>Enter the following command to view the list of all the extensions available in the default community channel &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage list-available<\/pre>\n<p>A long list gets generated after entering the above command. If you wish to filter the results, use grep command.<\/p>\n<p>For example, type the following command to list all Magento extensions related to search &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage list-available | grep -i search<\/pre>\n<div style=\"background-color: #e0ffff; padding: 10px;\"><strong>Note:<\/strong> If you want to work from with the extensions from a third-party channel then use the channel-add option to add the channel. Enter following command and replace channel with the URL of the channel that you want to add &#8211;<br \/>\n<strong>.\/mage channel-add channel<\/strong><\/div>\n<p>This command assumes that you are using the community channel.<\/p>\n<h3># Commands to download and install Magento extensions<\/h3>\n<p>Enter the following command to download and install an extension in one step. Replace <span style=\"color: #ff0000;\">name<\/span> with the <span style=\"color: #000000;\">name<\/span> of the extension you want to install &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage install community name<\/pre>\n<p>Enter the following command to download an extension without installing it. Replace <span style=\"color: #ff0000;\">name<\/span> with the name of the extension you want to download &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage download community name<\/pre>\n<p>Enter the following command to install an extension that you have already downloaded. Replace <span style=\"color: #ff0000;\">filename<\/span> with the path and name of the file that you want to install &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage install-file filename<\/pre>\n<h3># Commands to upgrade extensions<\/h3>\n<p>Enter the following command to determine if there are any upgrades available for your installed extensions &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage list-upgrades<\/pre>\n<p>Enter the following command to upgrade all extensions at once &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage upgrade-all<\/pre>\n<p>Enter the following command to upgrade a specific extension. Replace name with the name of the extension that you want to upgrade &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage upgrade community name<\/pre>\n<h3># Uninstalling Magento extensions<\/h3>\n<p>Type the following command to uninstall an extension. Replace name with the name of the extension that you want to remove &#8211;<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">.\/mage uninstall community name<\/pre>\n<h3># Automate extension management using cron<\/h3>\n<p>You are allowed to use the mage script in cron jobs to automate administration tasks for your extensions. For example, the following command of cron configuration upgrades all extensions every Sunday at 3:00 AM :<\/p>\n<pre class=\"trim-whitespace:false lang:default decode:true \">0 3 * * Sun cd \/home\/username\/public_html &amp;&amp; .\/mage upgrade-all<\/pre>\n<p>That&#8217;s it!<\/p>\n<p><strong>Also Read :<\/strong><\/p>\n<p><strong>1)\u00a0<\/strong><a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-google-analytics-for-your-magento-store\/\" target=\"_blank\" rel=\"noopener\"><strong>How To Enable Google Analytics For Your Magento Store?<\/strong><\/a><\/p>\n<p><strong>2)\u00a0<\/strong><a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/reset-the-password-magento-admin-panel\/\" target=\"_blank\" rel=\"noopener\"><strong>How to reset the password for Magento admin panel?<\/strong><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will guide you on how to use the mage script to manage Magento Connect extensions from the command line. # Brief about Mage Script Magento incorporates the mage script that enables you to manage Magento Connect extensions. Mage script can be used in cron jobs and other types of automation tools because it [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[1259,204,1258,1257],"class_list":["post-8968","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos","tag-install-magento-extension-from-command-line","tag-magento","tag-magento-extension","tag-magento-extension-using-command-line"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb<\/title>\n<meta name=\"description\" content=\"A guide on how to install Magento extension from command line.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"og:description\" content=\"A guide on how to install Magento extension from command line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-28T11:01:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-18T13:20:30+00:00\" \/>\n<meta name=\"author\" content=\"Sonam Wagh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sonam Wagh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\"},\"author\":{\"name\":\"Sonam Wagh\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"headline\":\"How to Install Magento Extension from Command Line?\",\"datePublished\":\"2020-01-28T11:01:48+00:00\",\"dateModified\":\"2022-02-18T13:20:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\"},\"wordCount\":524,\"commentCount\":0,\"keywords\":[\"install Magento extension from command line\",\"Magento\",\"Magento extension\",\"Magento extension using command line\"],\"articleSection\":[\"How-Tos\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\",\"name\":\"How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2020-01-28T11:01:48+00:00\",\"dateModified\":\"2022-02-18T13:20:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\"},\"description\":\"A guide on how to install Magento extension from command line.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Magento Extension from Command Line?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4\",\"name\":\"Sonam Wagh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg\",\"caption\":\"Sonam Wagh\"},\"description\":\"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/sonam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb","description":"A guide on how to install Magento extension from command line.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb","og_description":"A guide on how to install Magento extension from command line.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2020-01-28T11:01:48+00:00","article_modified_time":"2022-02-18T13:20:30+00:00","author":"Sonam Wagh","twitter_misc":{"Written by":"Sonam Wagh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/"},"author":{"name":"Sonam Wagh","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"headline":"How to Install Magento Extension from Command Line?","datePublished":"2020-01-28T11:01:48+00:00","dateModified":"2022-02-18T13:20:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/"},"wordCount":524,"commentCount":0,"keywords":["install Magento extension from command line","Magento","Magento extension","Magento extension using command line"],"articleSection":["How-Tos"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/","name":"How to Install Magento Extension from Command Line? - Web Hosting FAQs by MilesWeb","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2020-01-28T11:01:48+00:00","dateModified":"2022-02-18T13:20:30+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4"},"description":"A guide on how to install Magento extension from command line.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-install-magento-extension-from-command-line\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Install Magento Extension from Command Line?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/dc645d02823c86e07e53798ebe02c6f4","name":"Sonam Wagh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/12\/Sonam-Wagh-150x150.jpg","caption":"Sonam Wagh"},"description":"With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.","url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/sonam\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=8968"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8968\/revisions"}],"predecessor-version":[{"id":16185,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8968\/revisions\/16185"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=8968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=8968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=8968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}