Stack Exchange Network

Stack Exchange network consists of 174 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 [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.

0
votes
0answers
17 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....
3
votes
2answers
164 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
49 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
59 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
63 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
1answer
44 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 ...
1
vote
0answers
45 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
37 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
0answers
31 views

Unable to save product using console command

I have created a custom command to delete all gallery images. When I execute the same code by putting it into the controller and using browser it works well but when I use it inside a console command ...
0
votes
1answer
245 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-...
15
votes
6answers
3k 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?
1
vote
1answer
939 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
16 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
230 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
0answers
83 views

how to install magerun custom commands addons magento 2

I want to install magerun custom command. For this i create a folder MAGENTO_ROOT/lib/n98-magerun/module/ inside this i place magerun module. when i run command like : n98-magerun2.phar eav:check:...
3
votes
3answers
40 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 ...
0
votes
2answers
276 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 ...
0
votes
2answers
170 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
148 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 ...
0
votes
1answer
292 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/...
1
vote
2answers
67 views

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

I'm new for Magento 2 and I'm trying add custom command for beginning 'hello world'. I'm doing all by guide but always have this error [ReflectionException] Class Hesoy\HelloWorld\Console\...
3
votes
0answers
44 views

REİNDEX SYMFONY ERROR SCREENSHOT

[![this is my problem][1]][1] CommandNotFoundException ERROR My Screenshot KALİ: https://image.ibb.co/gu6fWb/Screenshot_from_2017_12_29_03_05_41.png HELP THANX GUYS
1
vote
0answers
137 views

Override class in setup:upgrade command in magento2

I am trying to override the class FilePermissions (magento/framework/Setup/FilePermissions.php) but my changes are not taken in account while I use the bin/magento setup:upgrade I tried : To add a ...
0
votes
1answer
141 views

magento sampledata:remove not working

I want to remove sample data or reinstall magento 2.2.1 without sample data i tried below command. php bin/magento sampledata:remove command is not working and throwing below error [Composer\...
1
vote
2answers
296 views

magento 2.2.1 command is not working

I setup a Magento 2.2.1 version and I can't give any command by git bash. when I give Magento common commands it shows error. like this: $ php bin/magento cache:status Magento supports 7.0.2, 7.0....
0
votes
1answer
181 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
1answer
163 views

Delete collection item through console command

My goal is to delete the default shipping address of all customer. The code looks something like this: foreach ($customerCollection as $customer) { $customer->load($customer->getId());...
0
votes
1answer
299 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
5
votes
1answer
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/...
6
votes
2answers
16k views

When exactly to use php bin/magento setup:upgrade

There are lots of situations in which I change some files in my module in the developer mode but the changes didn't take place in frontend until I run php bin/magento setup:upgrade Just wanted to ...
0
votes
3answers
3k 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