Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cli]

Denotes questions related to CLI which is a short form of Command-Line Interface

2
votes
2answers
48 views

Installing extension via Composer

I have tried to install the extension via Composer and successfully installed. After installing, I can see the extension menu in the admin panel. However, I can't see any files in the app/code ...
2
votes
2answers
31 views

While trying to Reindexing through the command prompt generate error

Command I used : php bin/magento indexer:reindex
2
votes
1answer
67 views

How to run command CLI in Magento 2

I'm facing the same problem as MagentoProblem this link. It is about messy frontend and backend of Magento 2. This happened after i set https://(My_Domain_Name).com into Configuration > Web > Base ...
1
vote
1answer
25 views

Magento\Catalog\Helper\Image returns unsecure product image url in custom CLI command

I am using Magento's image helper class to try to get a product's image url in a CLI command: $this->image->init($product, 'product_page_main_image_default')->getUrl(). When I use this code ...
3
votes
2answers
100 views

Magento 2 - Custom shell command not working

I want to execute some code using custom command like: php bin/magento mycommand:dothis To enable this command I have added this code in di.xml <type name="Magento\Framework\Console\CommandList"&...
1
vote
0answers
40 views

Upgrade from Magento 2.2.6 to 2.3.1 CLI Command Error

When upgrading from Magento CE 2.2.6 to Magento CE 2.3.1, I am following the command line upgrade as explained here. All was well and the commands ran just as they should have until I ran the ...
1
vote
0answers
96 views

Magento 2.3: How to configure magento CLI commands to use custom names for dangerous redis commands

Environment OS: Ubuntu 18.04 LTS Server: Apache 2.4 Database: MySQL v14.14 distribution 5.7.25 PHP: 7.2 Redis: 5.0.4 Issue Following the digitalocean tutorial referenced ...
0
votes
0answers
27 views

Magento 2 circular dependancy error on upgrade

I'm currently running a website on Magento 2.2.7 When we add any new module and run the php bin/magento setup:upgrade command the admin panel immediately stops working and gives us an error beginning ...
1
vote
0answers
17 views

Magento 2 : How can we identify phpexecutable or not?

I'm working on creating custom console in which i have to add code that will check php is executable using below class. If PHP executable then which PHP version is executable. SyncCommand.php ...
0
votes
1answer
54 views

Command line user does not have read and write permissions on generated directory. Please address this issue before using Magento command line

My Magento site is down and I see main.CRITICAL: Cannot write to the "/var/www/html/var/debug/db.log" file. Unable to write {"exception":"[object] (Magento\Framework\Exception\...
1
vote
2answers
78 views

Magento 2 - Syntax error on bin/magento support:backup:db

I am trying to get backup of DB using following command php -dmemory_limit=1G bin/magento support:backup:db It is giving me syntax error: sh: 2: Syntax error: word unexpected (expecting ")") Error: ...
0
votes
0answers
28 views

Why di compile not working with 100% in magento 2? [duplicate]

I have Magento 2 setup But when I run cmds: php bin/magento s:up Next then I ran php bin/magento s:d:c Every time try this without error it will be moved to next How I can solve this? My ...
0
votes
2answers
26 views

Area Code not set, caused by programatically creating shipment

While creating a module, the following error occurs after creating a custom cli command: Area code not set: Area code must be set before starting a session. I have already stated the area code in ...
2
votes
1answer
51 views

Getting a CLI error when trying to compile

I am getting this error on terminal: PHP Fatal error: Class 'Cli' not found in /opt/bitnami/apache2/htdocs/bin/magento on line 31 when trying to run these commands: sudo php bin/magento setup:...
1
vote
0answers
12 views

Magento2 2.3 Update Error Requirements not satisfied

When i try to run "composer update" i am getting following errors. PHP 7.1.20 Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for ...
2
votes
1answer
73 views

Magento 2.2.5 After Upgrade To 2.3 CLI commands don't work

I upgraded magento version by documentation, after upgrade this happens: When running php bin/magento cache:flush or any other bin/magento command error appears There are no commands defined in the "...
2
votes
1answer
65 views

How I can solve the di:compile error in Magento 2?

When I run setup:di:compile I got error Errors during compilation: Vendor\CustomRegistration\Model\Customer\DataProvider Incompatible argument type: Required type: bool. Actual type: \Vendor\...
0
votes
1answer
13 views

Error related to Framework in Magento 2 SSH CLI

I'm currently running a Magento 2 (2.2.7) site and I've been getting the following error in the CLI when I enter certain commands (usually to do with enabling/disabling modules). The directory "/...
4
votes
3answers
1k views

Magento2 which command Run and when to Run

Kindly Clear Difference Between php bin/magento cache:flush and cache:clean and when they need to Run . which tasks Output to need cache:flush or clean ** and which task need these Commands => **di:...
1
vote
1answer
26 views

Magento 2 how to set proper file and folder permission in localhost ubuntu 18?

i'm using magento 2 in local setup in ubuntu 18 when every time i run cmds php bin/magento s:s:d -f php bin/magento s:up php bin/magento s:d:c the file permission changed how to give proper ...
1
vote
2answers
25 views

CLI to find out what version my modules are?

When I run a bin/magento list it doesn't say anything specific about finding out the schema and module versions. Does anyone know how to figure this out using command line?
2
votes
1answer
90 views

why my magento 2 localhost setup in very slow?

When i run cli cmds it's take to much time >php bin/magento s:s:d -f frontend/Magento/luma/en_US 2918/2918 ===100% % 10 mins frontend/Solwin/kosmic_child/...
0
votes
1answer
232 views

Removing modules from vendor magento 2.3

I'm trying to remove a few modules located inside the vendor folder. If i remove them manually it throws an error on the frontend. Warning: require(/srv/public_html/vendor/composer/../amzn/amazon-pay-...
0
votes
0answers
40 views

CSS failing to compile

Whenever I run the cmd via terminal to compile assets my CSS is being churned out with the following error error evaluating function `darken` The first argument to darken must be a color index: 2570 #...
0
votes
2answers
32 views

Magento 2 change colours

I am trying to change the colours from the standard Magento 2 blank theme via the _theme.less file. I currently have the following file structure /public_html/app/design/frontend/GladiatorFitness/...
0
votes
1answer
28 views

How do I restore Magento Cloud environments deleted by GitHub integration?

I followed the instructions to setup a GitHub integration with my Magento Cloud Pro project. This project has not been made live yet, but has been in development for several months and therefore has ...
0
votes
1answer
43 views

How to walk through a collection with pagination

I working on a command line which is fetching all the products in the database, using the Magento\Catalog\Model\ResourceModel\Product\CollectionFactory object. In order to avoid memory problems, I'm ...
0
votes
1answer
42 views

Magento 2 localhost wamp cron jobs

I'm still getting the error on my admin page "One or more indexers are invalid. Make sure your Magento cron job is running" All field indexes rebuild successfully apart from Catalog Search. I'm using ...
0
votes
2answers
86 views

“Could not open input file” error while running php command in windows

I have installed Magento 2.2.5 on my loaclhost windows system. I use wamp server. I am unable to run any php command and getting the error Could not open input file: C:\wamp64\www\magento2 I got this ...
0
votes
3answers
350 views

Magento 2.3 Useful SSH CLI Commands List [duplicate]

list of magento 2 SSH CLI Commands what is magento ssh cli command for Upgrade? what is magento ssh cli command for Cache Clean? what is magento ssh cli command for Cache Flush? what is magento ...
0
votes
0answers
34 views

when I ran setup:upgrade command then error showing in magento2

php version is = 7.0.32 I am getting this error after upgrade my magento site from 2.2.1 to 2.2.7 when I ran setup:upgrade command then below error showing Cache frontend 'default' is not ...
1
vote
1answer
140 views

How the catalog:product:attributes:clean works?

I have used the below command in Magento CLI, php bin/magento catalog:product:attributes:clean I read the description for this command in forums and stack overflow, they only say Removes unused ...
0
votes
0answers
240 views

Catalog Search indexer process unknown error

I'm getting a 'One or more indexers are invalid. Make sure your Magento cron job is running.' and it seems I need to run php bin/magento indexer:reindex from the CLI. I get the index rebuilt ...
2
votes
2answers
172 views

display all customers using console command magento2.2.3

How to display registered customers in terminal using custom console command?Can anyone please help me out.
4
votes
1answer
1k views

Magento2.3 setup:upgrade error

After being able to update magento to 2.3 (which was a pain by itself) I managed to get to the part where the database needs to be updated. Which is in current state when I try to run the command bin/...
0
votes
1answer
32 views

Magento 2: Batch for CLI-commands

I am often using the following commands one after another: php bin/magento setup:upgrade php bin/magento setup:di:compile Now I am wondering if it is possible to create a batch-command (like in old ...
0
votes
1answer
172 views

Magento 2.1.15: Compilation error: Class Magento\Framework\Serialize\Serializer\Json does not exist

I did the following command on the CLI of a Magento 2.1.15 installation: php bin/magento setup:di:compile -vvv The following exception occurred: [RuntimeException] ...
1
vote
1answer
275 views

remove 'pub/' folder for URLs from command line

For increased security, we configured the DocumentRoot for our Magento application to be in the pub/ directory of the Magento installation, as described in the official documentation. However, there ...
0
votes
1answer
34 views

When I run CLI commands in magento 2.2

When I run CLI commands in magento 2.2 php bin/magento setup:upgrade I'm getting following error. [Zend_Db_Adapter_Exception] SQLSTATE[HY000] [2002] Connection timed out [...
0
votes
0answers
136 views

Magento 2: InvalidArgumentException There are no commands defined in the “cache” namespace

I have facing issue while run command. I can't use any bin/cli commands in magento 2. I keep getting below generic error messages. Error: InvalidArgumentException There are no commands defined in ...
0
votes
2answers
230 views

Is it possible to reindex without CLI?

I am getting the error: One or more indexers are invalid. Make sure your Magento cron job is running. I know that I could fix this using the command php bin/magento indexer:reindex using the ...
1
vote
0answers
74 views

Magento 2: Setting theme ID is not is not working by using config:set

I found xpath design/theme/theme_id in vendor/magento/framework/View/DesignInterface.php:28. I'm trying to set new ID and there is an error: magento config:set design/theme/theme_id 7 The "design/...
1
vote
0answers
227 views

Composer command not running magento2

I am trying to run the following command - composer require ebizmarts/mailchimp-lib But I am getting following error on command line - [UnexpectedValueException] ...
2
votes
3answers
175 views

CLI: What is the difference between “setup:static-content:deploy” and “dev:source-theme:deploy”?

I wanto to know the difference between: php bin/magento setup:static-content:deploy and php bin/magento dev:source-theme:deploy I know that second receives as options name of specific vendor, ...
1
vote
2answers
32 views

mess up ownerships after cli action

so I am running a magento 2.2.4 in development and one in production, the dev is ok and I can do all, the production is an exact copy of it on apache 2.4 and Ubuntu 16.04, every time I use any kind of ...
0
votes
2answers
41 views

Specific Theme for specific language, can I compile each theme in just the applicable languages?

We have a site that has been designed with a new theme for each language and each language on a different URL. It's not how I would have built it but we have to "run what you brung". The problem I ...
1
vote
1answer
218 views

Problem with reindex terminal

I have an issue with the reindex of Magento. I have try to do this with the terminal and this is the response error [Exception] ...
2
votes
1answer
147 views

static files deleted after php bin/magento setup:upgrade

While setting up new module and after running php bin/magento setup:upgrade it started to clean cache and file and deleted all front end css and adminhtml css and all visual files. How Can I prevent ...
1
vote
1answer
131 views

Magento 2 bin folder missing can't run any cli commands

I am working on a client's shop, and the bin folder is missing, how can that be possible? Can I recreate it with the files inside? Its a noob question but I never faced this issue... -rw-r--r-- 1 ...
1
vote
1answer
153 views

Magento Core doesnt work after transfer

Hello i just put my store to other new server but i have very big problems... I set right permissions ( owner and group too ) to magento dir but i get this error Magento\Framework\Exception\...