Questions tagged [command-line]

Denotes questions related to command line.

Filter by
Sorted by
Tagged with
16
votes
6answers
5k views

Magento 2: When should I run which commands?

I have been working with Magento 2 for 2 months now. I realized that I am using bin/magento setup:upgrade way too much. I think I do not know when I have to run that command. Here are the situations ...
5
votes
2answers
5k views

How to install module magento 2 don't need run command line bin/magento setup:upgrade

I need to install module pf magento 2 in hosting. I'm trying to connect host with port 21 using putty but not success. I need one other way, please help me.
17
votes
4answers
39k views

How to reindex Magento 1.x by using command line

How can I reindex magento using by command line. Kindly provide steps for the same.
32
votes
5answers
15k views

Why can't one switch back to the default mode on Magento 2?

So I have switched to the developer mode while developing on a Magento 2 project using the following command: php bin/magento deploy:mode:set developer All good, I got this message and I developed ...
11
votes
2answers
3k views

Magento2 - Command-Line - Sending Email Using Block Templates - Error: Missing required argument $debugHintsPath

When attempting to send emails in Magento 2 from command-line, I encountered the exception below. While using the very same class to send emails from an frontend or backend controller was working ...
1
vote
2answers
2k views

Error display on Setup upgrade command

I am facing an error while running command bin/php magento setup:upgrade. It return the error shown below. [Magento\Setup\Exception] Database ...
1
vote
1answer
226 views

Magento 2 : How to create our own bin script [duplicate]

I am trying to create my own script to be placed in my extension /bin folder so that once I finished it, it should work in this way bin/mycommandname my-customcommand instead of running the ...
19
votes
5answers
20k views

Magento 2: What is difference between Cache Clean & Cache Flush?

In Magento 2 we have 2 commands php bin/magento cache:flush php bin/magento cache:clean What's the exact difference between them? I'm generally using cache:flush. I never used cache:clean. So, ...
8
votes
5answers
3k views

Changes to CSS and JavaScript applies only after deploying static content

I installed Magento 2 from the Magento site. I have activated the developer mode by {project directory}>php bin/magento setup:mode:set developer Then I have installed my custom theme and finally ...
5
votes
3answers
6k views

Magento 2 command line install (too many arguments)

so I am trying to make a bash script in Magento, and I am learning from the bottom up. So I have the basic arguments ready to be used in the script I am making, but when I execute sudo php magento ...
3
votes
3answers
2k views

Magento 2: Controlling M2 via command line – when and why to use each command

When making changes to my Magento 2 site, I usually run a few of the command line commands to 'refresh' my site to see the changes I've made. The problem is, I'm not too sure what each command really ...
2
votes
2answers
4k views

Magento 2 How to Create a Custom Console Command

Is it possible to create a new Magento command for example to delete the generation folder?
1
vote
1answer
730 views

Magento Code Migration Tool - Installation issue

i'm currently following the steps in https://github.com/magento/code-migration to install the Code Migration Tool (not data migrate) to my localhost. i am facing a problem at the Installation ...
1
vote
1answer
345 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 ...
-2
votes
1answer
934 views

how to call magento2 cli commands from controller? [closed]

i created some custom command.in one scenario i need to execute this command in the background in controller file. i'm trying to use following syntax.but its not working. exec('php bin/magento ...