Questions tagged [command]

Command is a short hand for the built in Command Line tools (or CLI) in Magento 2, the custom CLI tools made for Magento 1 or other actions that are executed on a Magento site using the Command Line (i.e. the Terminal application for mac) when logged into a server with SSH.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

Could not open input file: bin/magneto error after every command in magent2.3.3

I have freshly installed magento 2.3.3 but when i am trying to run indexer or any other command i am getting following errors. Could not open input file: bin/magneto I have tried so many commands ...
1
vote
1answer
22 views

Run multiple cron groups but not all in magento 2

I wanted to run the following way. php bin/magento cron:run --group="test_group1","test_group2","test_group3" OR php bin/magento cron:run --group="test_group1,test_group2,test_group3" What is the ...
0
votes
0answers
11 views

Magento 2: unit test of a private method into a command

I've developed a new command and it works fine. class TemplateHintsStatusCommand extends Command { .. /** * @var ScopeConfigInterface */ private $scopeConfig; /** * @...
0
votes
2answers
586 views

Magento2 deploy command not working and rest commands are working

I have tried to run this php bin/magento setup:static-contnet:deploy command on the magento root folder then it showing the below error "Notice: Undefined offset: 0 in /home/nuluv938/public_html/...
6
votes
7answers
4k views

Magento 2 Setup di Compile Problem

After I upgraded to Magento 2.3, running the command setup:di:compile, I get this error: Area configuration aggregation... 5/7 [====================>-------] 71% 58 secs 276.0 MiB In ClassReader....
0
votes
1answer
26 views

How to upgrade Magento-CE-2.2.10 to Magento-CE-2.3.3 using Composer?

I have magento 2.2.10 CE. I want to upgrade 2.2.10 to 2.3.3 CE with commands only. Does anyone know how to upgrade it with commands? Thanks in advance.
21
votes
6answers
10k views

Magento 2 : list of command shortcuts

I need to know the list of useful commands for Magento 2 in short-cut form Can anyone help me?
2
votes
1answer
165 views

Magento 2: Running any command getting error Class Magento\Webapi\Model\Cache\Type\Web Api\Interceptor does not exist

Running any command s:up , s:di:c s:s:d -f cache getting error Class Magento\Webapi\Model\Cache\Type\WebApi\Interceptor does not exist And like below images, any help will be appreciate.
0
votes
2answers
82 views

Magento 2 How to stop particular group cron?

I runned cron command, now all cron group are running. But I wanted to stop my custom group cron. Please tell me how to stop it?
0
votes
0answers
23 views

I can only add one command in one module

I have created a command the class is Vendor\CreateProduct\Command\CreateProduct. It could be found when I type: php bin/magento But when I create another command which class is Vendor\CreateProduct\...
2
votes
3answers
319 views

How to upgrade magento 2.3.1 CE to 2.3.3 CE?

I have magento 2.3.1 CE. I want to upgrade 2.3.1 to 2.3.3 CE with commands only. Does anyone know how to upgrade it with commands ? Thanks in advance.
4
votes
0answers
48 views

REİNDEX SYMFONY ERROR SCREENSHOT

Magento facing indindex issue, please check with below url - CommandNotFoundException ERROR My Screenshot KALİ: https://image.ibb.co/gu6fWb/Screenshot_from_2017_12_29_03_05_41.png HELP THANX GUYS
1
vote
2answers
67 views

Magento 2.3.2 Developer mode error in setup:di:compile

I am using the Magento 2.3.2 version. When I run the "setup:di:compile" command then Can't remove directory: directory is not empty error occurred. I have also set the permission of the generated ...
-1
votes
1answer
41 views

What is the use of this Command bin/magento i18n:collect-phrases -m?

What is the use of this below command? bin/magento i18n:collect-phrases -m explain me briefly. Thanks,
2
votes
3answers
257 views

What is the use of command?

php bin/magento dev:source-theme:deploy What is the use of this above command? Explain briefly. Thanks
2
votes
3answers
119 views

How Uninstall Theme Using command line in Magento 2

How to uninstall or remove a theme using the command line In Magento 2. Thank You...
0
votes
3answers
76 views

Error while running di:compile command

Getting ReflectionException] Class PayPal\Api\PayoutSenderBatchHeader does not exist error while running php bin/magento setup:di:compile command
0
votes
0answers
47 views

Magento2: setup:di:compile issue

Got the error below when I run the setup:di:compile command [Magento\Framework\Exception\LocalizedException] Source class "\Magento\Framework\EntityManager\OperationInterface" for "Magento\...
0
votes
4answers
4k views

Running “bin/magento setup:static-content:deploy” gives “Permission denied”

When running: root@ubuntu:/var/www/Magento2# bin/magento setup:static-content:deploy I got -bash: bin/magento: Permission denied please note that I'm running the command using root user
1
vote
1answer
107 views

Magento 2 : Area code must be set before starting a session?

We have a custom console command and it was working fine in Magento 2.2.7 , when we move this extension to Magento 2.3 it failed when we running setup:upgrade. Anyone who have faced exact similar ...
0
votes
1answer
35 views

Magento 1 : Get product collection using command line throwing error

I have a script file like getproducts.php & have placed it under script/getproducts.php. I want to get products collection in my script file. code in my file: <?php require_once('../app/Mage....
2
votes
1answer
288 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
0answers
22 views

how to run linux command in magento1

How to run below linux command in Magento 1 under observer/model? grep -n 'tracker' test.txt which can be later used for cron?
5
votes
2answers
2k views

Command line error stock magento

I get this error after install when trying to clear var/ generation, and static content deploy via command line. [Exception] Warning: Invalid argument supplied for foreach() in /vendor/magento/...
3
votes
2answers
314 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
38 views

What's the difference between flush the cache from admin panel and through command?

I have seen that we can flush the Magento cache via admin panel System> Cache Management and as well as by running the below command php bin/magento cache:flush I would like to know what's the ...
2
votes
2answers
370 views

Magento 2 : Run command line without prompt confirmation

When I run: bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx I get a command prompt: Overwrite the existing configuration for http-cache-hosts?[Y/n] I want to use this into a bash ...
0
votes
3answers
60 views

When to run compile command in Magento?

I have updated the CSS for our site. After updating, I ran the below commands: php bin/magento setup:static-content:deploy -f php bin/magento cache:flush But the changes are not applied when I ...
0
votes
0answers
111 views

How to create custom module after installing Magento 2 Docker Image?

I have installed Magento docker Image and frontend, backend is working fine. The directory structure of Magento docker Image installed is: Now I am looking how to start my first module. I have these ...
1
vote
2answers
389 views

Cannot add new cli command “Class does not exist” on setup:upgrade

I am trying add custom command for beginning 'hello world'. I'm doing all by guide but always have this error [ReflectionException] Class Hesoy\HelloWorld\Console\Command\HelloWorldCommand ...
0
votes
1answer
270 views

reindex command not working

I am trying to reindex using the following command from public_html folder (root directory): php bin/magento indexer:reindex I have even tried bin/magento indexer:reindex I receive the ...
0
votes
4answers
83 views

Magento 2 indexer:reindex Command Not Working

when i run command php bin/magento indexer:reindex it don't reindex all indexers. but when i run php -dmemory_limit=6G bin/magento indexer:reindex the the following error Please advice your ...
2
votes
2answers
123 views

Magento Commands Not working

Any one can help will be highly appriciated, i'm running magento 2.2.6 Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /home/...
1
vote
2answers
478 views

Magento Commands - Segmentation Fault (Core Dumped)

I receive the following error when running any of the magento commands in CL? Any ideas on how to resolve? Segmentation Fault (Core Dumped) Thanks
1
vote
2answers
76 views

Magic Method unsItemName()

I'm trying to use an unset magic method to delete a row from the table. Following is the line of code from execute method of my CLI command. $item->unsEquipmentName($input->getArgument(self::...
1
vote
3answers
1k 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 ...
3
votes
2answers
226 views

Can anyone please explain how the all magento command work in magento2(I want to undesrstand backend process)?

Can anyone please explain how the all magento command work in magento2(I want to understand backend process) Like: IF I am running command php bin/magento module:status which file will affect and ...
0
votes
1answer
751 views

Magento 2: How to Call a Console Command from a Custom Cron job?

I'm working on a custom Cron and I want find the best way to call other commands from the Cronjob code in magento2 (programmatically). For example: When running cli "php bin/magento cache:clean" and ...
1
vote
1answer
293 views

Magento 2.2.5 shell script PHP Memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes)

I have a magento 2 script which runs through shell so to not have a timeout issue. It uses php multi curl request and it was running fine. But recently asked our hosting server to increase the PHP cli ...
2
votes
1answer
72 views

Commands for correct deploy

What are the basic commands to be executed for Deploy in Magento 1 and Magento 2 after doing the git pull?
1
vote
0answers
634 views

Magento 2: How to call a command from a Controller?

I have created a command and now I need to call it from a controller. How to do it? This is the command: class CleanVarnish extends Command { protected function configure() { $this-&...
0
votes
1answer
60 views

Why i ran bin/magento cache:flush after need sudo chmod -R -v 777 generated var pub [duplicate]

I am using 2.2.4 Magento when I ran the this command every time bin/Magento cache:flushafter. I need sudo chmod -R -v 777 generated var pub, if not it will error. how can I Solve this problem, thank ...
0
votes
1answer
536 views

Magento 2 : How to solve Catalog Rule Product Status: REINDEX REQUIRED ( NO SSH access )

I have problem with Catalog Rule Product Status: REINDEX REQUIRED. I'm using Magento 2.2.3 & DirectAdmin without SSH access. Also, I triad through Admin panel & it's not working. My Cron-...
2
votes
1answer
2k views

Magento 2: How to properly set app state “Area code”? (setAreaCode, getAreaCode)

I see there isn't a lot of information about using app states and if there is it doesn't work properly. So bellow is my answer based on my own investigation.
0
votes
1answer
17 views

Magento2 Frontend and backend doesn't work while executing commands

Whenever I execute setup:di:compile and setup:static-content:deploy commands from SSH, magento2 frontend and backend showing error. My magento2 store in production mode. What should I do before run ...
0
votes
1answer
424 views

Magento compile error php bin/magento setup:di:compile

I am running Magento 2. And my Magento admin is missing CSS also the below error is shown while compiling . syntax error, unexpected '?' in /home/username/public_html/store/vendor/magento/module-...
0
votes
2answers
856 views

Magento 2 - When I run any command it gives me error

php -f bin/magento cache:flush php bin/magento setup:upgrade Commands giving this error.Please check this, https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-error For more info on ...
2
votes
3answers
41 views

Command tutorial

I Magento to avoid commands completely on our first 2 website using Magento1, but it seems like I can't avoid it anymore with Magento2. Where do I start? I can find hundreds of tutorial online but i'm ...
1
vote
2answers
569 views

How to Run magento 2 command without connect putty?

When our Magento 2 on live server and we require to enable disable modules, flush cache , deploy static files etc ,we need to configure SSH. but now not connect my putty so how to run all command
1
vote
1answer
266 views

Magento 2. Command that is executed when admin:user:create is executed

Magento 2 has a console command admin:user:create At a quick search we find a class that defines a command with such a name Magento\Setup\Console\Command\AdminUserCreateCommand Yet putting a ...