{"id":555,"date":"2026-06-17T06:59:07","date_gmt":"2026-06-17T06:59:07","guid":{"rendered":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/"},"modified":"2026-07-26T14:45:41","modified_gmt":"2026-07-26T12:45:41","password":"","slug":"comenzi-utile-prin-linia-de-comanda-in-magento-2","status":"publish","type":"docs","link":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/","title":{"rendered":"Cum folosesc interfa\u021ba de linie de comand\u0103 (CLI) \u00een Magento 2?"},"content":{"rendered":"<p>Interfa\u021ba de linie de comand\u0103 (CLI) din Magento 2 se folose\u0219te prin scriptul <code>bin\/magento<\/code>. Iat\u0103 cum \u00eencepi.<\/p>\n<h3>1. Verific\u0103 PHP CLI<\/h3>\n<p>PHP CLI este instalat implicit \u00eempreun\u0103 cu PHP. Din folderul r\u0103d\u0103cin\u0103 Magento ruleaz\u0103:<\/p>\n<pre><code>php bin\/magento<\/code><\/pre>\n<p>Dac\u0103 vezi lista de comenzi, PHP CLI func\u021bioneaz\u0103 corect. Dac\u0103 prime\u0219ti <strong>\u201eCommand not found&#8221;<\/strong> sau erori de tip <strong>\u201ePHP Parse error&#8221;<\/strong>, cel mai probabil folose\u0219ti o versiune PHP gre\u0219it\u0103. Verific\u0103 versiunea cu <code>php -v<\/code> \u0219i asigur\u0103-te c\u0103 e una suportat\u0103 de versiunea ta de Magento (vezi <a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-operations\/installation-guide\/system-requirements\">cerin\u021bele oficiale<\/a>). Ruleaz\u0103 comenzile ca proprietar al sistemului de fi\u0219iere Magento.<\/p>\n<h3>2. Cele mai folosite comenzi<\/h3>\n<ul>\n<li><code>php bin\/magento cache:enable<\/code> \/ <code>cache:disable<\/code> \u2014 activeaz\u0103\/dezactiveaz\u0103 cache-ul<\/li>\n<li><code>php bin\/magento setup:upgrade<\/code> \u2014 actualizeaz\u0103 schema \u0219i datele<\/li>\n<li><code>php bin\/magento setup:di:compile<\/code> \u2014 compileaz\u0103 defini\u021biile de dependen\u021be (DI)<\/li>\n<li><code>php bin\/magento setup:static-content:deploy<\/code> \u2014 public\u0103 fi\u0219ierele statice (view)<\/li>\n<li><code>php bin\/magento indexer:reindex<\/code> \u2014 reindexeaz\u0103<\/li>\n<li><code>php bin\/magento cron:run<\/code> \u2014 ruleaz\u0103 sarcinile cron<\/li>\n<li><code>php bin\/magento module:status<\/code> \u2014 starea modulelor<\/li>\n<li><code>php bin\/magento maintenance:enable<\/code> \/ <code>maintenance:disable<\/code> \u2014 modul de \u00eentre\u021binere<\/li>\n<\/ul>\n<p>Pentru lista complet\u0103 ruleaz\u0103 <code>php bin\/magento<\/code> f\u0103r\u0103 argumente. Detalii suplimentare \u00een <a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-operations\/reference\/commerce-cli\">referin\u021ba CLI Adobe Commerce<\/a>.<\/p>\n<h3>3. Rularea comenzilor<\/h3>\n<ul>\n<li><code>php bin\/magento &lt;comand\u0103&gt;<\/code> \u2014 c\u00e2nd te afli \u00een r\u0103d\u0103cina site-ului;<\/li>\n<li><code>php magento &lt;comand\u0103&gt;<\/code> \u2014 c\u00e2nd te afli \u00een folderul <code>bin\/<\/code>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Interfa\u021ba de linie de comand\u0103 (CLI) din Magento 2 se folose\u0219te prin scriptul bin\/magento. Iat\u0103 cum \u00eencepi. 1. Verific\u0103 PHP CLI PHP CLI este instalat implicit \u00eempreun\u0103 cu PHP. Din folderul r\u0103d\u0103cin\u0103 Magento ruleaz\u0103: php bin\/magento Dac\u0103 vezi lista de comenzi, PHP CLI func\u021bioneaz\u0103 corect. Dac\u0103 prime\u0219ti \u201eCommand not found&#8221; sau erori de tip \u201ePHP &#8230; <a title=\"Cum folosesc interfa\u021ba de linie de comand\u0103 (CLI) \u00een Magento 2?\" class=\"read-more\" href=\"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/\" aria-label=\"Cite\u0219te mai multe despre Cum folosesc interfa\u021ba de linie de comand\u0103 (CLI) \u00een Magento 2?\">Cite\u0219te mai mult<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"whmcs_kb_id":1854,"footnotes":""},"doc_category":[160],"doc_tag":[234,437,227,243,225],"class_list":["post-555","docs","type-docs","status-publish","hentry","doc_category-magento-programare-aplicatii","doc_tag-administrare","doc_tag-cli","doc_tag-configurare","doc_tag-linia-de-comanda","doc_tag-magento-2"],"year_month":"2026-10","word_count":230,"total_views":"15","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Adrian Firican","author_nicename":"techeditor1","author_url":"https:\/\/www.hostx.ro\/kb\/author\/techeditor1\/"},"doc_category_info":[{"term_name":"Magento","term_url":"https:\/\/www.hostx.ro\/kb\/docs-category\/magento-programare-aplicatii\/"}],"doc_tag_info":[{"term_name":"administrare","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/administrare\/"},{"term_name":"CLI","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/cli\/"},{"term_name":"configurare","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/configurare\/"},{"term_name":"linia de comand\u0103","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/linia-de-comanda\/"},{"term_name":"Magento 2","term_url":"https:\/\/www.hostx.ro\/kb\/docs-tag\/magento-2\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CLI Magento 2: Ghid folosire bin\/magento - Centrul de suport HostX<\/title>\n<meta name=\"description\" content=\"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.\" \/>\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.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"ro_RO\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CLI Magento 2: Ghid folosire bin\/magento - Centrul de suport HostX\" \/>\n<meta property=\"og:description\" content=\"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Centrul de suport HostX\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-26T12:45:41+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Timp estimat pentru citire\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/comenzi-utile-prin-linia-de-comanda-in-magento-2\\\/\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/comenzi-utile-prin-linia-de-comanda-in-magento-2\\\/\",\"name\":\"CLI Magento 2: Ghid folosire bin\\\/magento - Centrul de suport HostX\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-17T06:59:07+00:00\",\"dateModified\":\"2026-07-26T12:45:41+00:00\",\"description\":\"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\\\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/comenzi-utile-prin-linia-de-comanda-in-magento-2\\\/#breadcrumb\"},\"inLanguage\":\"ro-RO\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/comenzi-utile-prin-linia-de-comanda-in-magento-2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/comenzi-utile-prin-linia-de-comanda-in-magento-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Prima pagin\u0103\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfoCentru\",\"item\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/docs\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cum folosesc interfa\u021ba de linie de comand\u0103 (CLI) \u00een Magento 2?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/\",\"name\":\"Centrul de suport HostX\",\"description\":\"tutoriale gazduire web, domenii web \u0219i servere\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hostx.ro\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ro-RO\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CLI Magento 2: Ghid folosire bin\/magento - Centrul de suport HostX","description":"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.","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.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/","og_locale":"ro_RO","og_type":"article","og_title":"CLI Magento 2: Ghid folosire bin\/magento - Centrul de suport HostX","og_description":"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.","og_url":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/","og_site_name":"Centrul de suport HostX","article_modified_time":"2026-07-26T12:45:41+00:00","twitter_card":"summary_large_image","twitter_misc":{"Timp estimat pentru citire":"1 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/","url":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/","name":"CLI Magento 2: Ghid folosire bin\/magento - Centrul de suport HostX","isPartOf":{"@id":"https:\/\/www.hostx.ro\/kb\/#website"},"datePublished":"2026-06-17T06:59:07+00:00","dateModified":"2026-07-26T12:45:41+00:00","description":"Ghid complet pentru CLI Magento 2: cum s\u0103 folose\u0219ti scriptul bin\/magento, s\u0103 verifici PHP CLI \u0219i s\u0103 rulezi comenzile esen\u021biale.","breadcrumb":{"@id":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/#breadcrumb"},"inLanguage":"ro-RO","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hostx.ro\/kb\/comenzi-utile-prin-linia-de-comanda-in-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Prima pagin\u0103","item":"https:\/\/www.hostx.ro\/kb\/"},{"@type":"ListItem","position":2,"name":"InfoCentru","item":"https:\/\/www.hostx.ro\/kb\/docs\/"},{"@type":"ListItem","position":3,"name":"Cum folosesc interfa\u021ba de linie de comand\u0103 (CLI) \u00een Magento 2?"}]},{"@type":"WebSite","@id":"https:\/\/www.hostx.ro\/kb\/#website","url":"https:\/\/www.hostx.ro\/kb\/","name":"Centrul de suport HostX","description":"tutoriale gazduire web, domenii web \u0219i servere","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hostx.ro\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ro-RO"}]}},"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/comments?post=555"}],"version-history":[{"count":2,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/555\/revisions"}],"predecessor-version":[{"id":5824,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/docs\/555\/revisions\/5824"}],"wp:attachment":[{"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/media?parent=555"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_category?post=555"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostx.ro\/kb\/wp-json\/wp\/v2\/doc_tag?post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}