Questions tagged [command-line]

Denotes questions related to command line.

Filter by
Sorted by
Tagged with
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 ...
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, ...
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.
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 ...
12
votes
3answers
5k views

magento 2: 'i18n:collect-phrases' command creates different csv files

php bin\magento i18n:collect-phrases -o "C:\xampp\htdocs\magento\app\design\i18n\xx_YY.csv" -m collects all phrases in the magento application and outputs a csv file with 4 columns: php bin\magento ...
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 ...
9
votes
2answers
7k views

How to debug Magento 2 code when using command lines?

Running a script in command line is something we frequently do in Magento 2. For example, when creating new module, we must run setup:upgrade command. We cannot see all the information we need to know....
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 ...
6
votes
2answers
868 views

Commands are not working even when I tried to give permissions

I am trying to run commands through ssh, but commands are not working. Please check the screenshot.
6
votes
1answer
2k views

How to get list of all routes in Magento 2?

Is it possible to get the list of all routes in a Magento 2 environment? I am looking some command-line tool, if there is any? Note: I had a bin/rails routes command to list all the routes in rails ...
5
votes
5answers
2k views

enable multiple modules for same namespace

I am installing a few modules one by one into my magento 2 application. Can we enable all modules in the same namespace with one command? Right now I am using: php bin/magento module:enable ...
5
votes
2answers
507 views

Difference between php bin/magento and bin/magento

In Magento when we run any command we use 'php bin/magento' and sometimes it runs also with 'bin/magento' So can any one explain what is the actual difference in these commands.
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.
5
votes
5answers
5k views

Magento 2 var/di folder is missing

There is no di folder generated in var directory. I am getting please re-run compile command. Why we need this di directory?
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/...
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 ...
5
votes
1answer
116 views

Is it possible to get the Magento indexer to display % complete?

Right now you are left wondering what is going on during indexing, especially on large catalogs where it takes hours to complete just one index. Is there an easy way to get the command line indexer....
5
votes
1answer
794 views

Magento 2 Terminal Progress bar while uploading csv file from terminal

I want to develop progress bar in a terminal because when I import CSV file its started to import but user has no idea how many records have been imported indicator will be like when we hit php bin/...
5
votes
2answers
2k views

Magento 2: Nginx pub/static not autogenerating, only works with command line static-content:deploy

I have tried many of the solutions from: Local installation of Magento 2 doest not generate files in the pub/static folder and similar posts: I am in developer mode (verified in command line, and I ...
5
votes
1answer
149 views

Problem with CLI

Hello i have an error of every command i press in CLI. Following this Error Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in /var/...
4
votes
2answers
2k views

How to inject Magento 2 commands in custom command?

To whom may concern, As the title said, I'm wondering is there anyway to inject/call/execute Magento default commands in my custom command? I'm just another guy who living in Terminal world and I'm ...
4
votes
1answer
1k views

problem with composer on magento 2

I want to setup new extension with composer on magento2 and I get this error: [Composer\Downloader\TransportException] Invalid credentials for 'https://repo.magento.com/packages.json', aborting. I ...
4
votes
1answer
2k views

How can i run system->import/export->export by Command ssh

I get no valid data send error during product export via system->import/export->export. Actually this because of time out error. How can run this export by command ssh.
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 ...
3
votes
1answer
5k views

Magento 2 - bin/magento No commands working - Class 'Cli' not found Error

PHP Fatal error: Class 'Cli' not found in /home/xxx-xxx/public_html/bin/magento on line 31 xxx-xxx@rck:~/public_html$ php bin/magento No lock file found. Unable to read locked packages#0 /...
3
votes
1answer
1k views

Magento 1.9.3 Command Line Not Available

I have a quick question regarding the command line tool seen in Magento 2. I've been using it and it's amazing cool. However now I'm working on an older version of Magento 1.9.3 and I see there isn't ...
3
votes
2answers
2k views

Magento 2 di:compile command gives fatal error

I have taken reference of an old module (Bannerslider) created for Magento 2 Beta version and I am trying to convert it to Magento 2 stable compatible (Mycompany_Bannerslider). When I enable the ...
3
votes
2answers
140 views

Magento 2: Implementing module with cli

I'm trying to implement a banner slider without Commands I have already pasted the folder into public_html/app/code/ And I created a PHP file in public_html and tried to run it but nothing happens ...
3
votes
1answer
875 views

Console command waiting for input from user

It is possible in PHP to create console command waiting for an input from user like this or like this. Is there any 'magento-way' or above approaches can be used?
3
votes
3answers
10k views

Magento 2 - setup:install & setup:upgrade

I have updated the code in my custom module and run setup:install already. Do I still need to run setup:upgrade?
3
votes
1answer
960 views

Installing Magento2 Data-Migration-Tool manual without composer

How can I install the magento2 data-migration-tool manual without composer? Already I copied the complete "data-migration-tool"-folder in vendor/magento. When I try to use migrate commands (ex. "...
3
votes
3answers
3k views

Set magento deployment mode to production fails

I've installed a new Magento 2 installation with Softaculous on my hostingserver. After installation I would change the default deployment mode to production but I have the following error (using SSH):...
3
votes
1answer
922 views

'php magento setup:di:compile' generated cache file with wrong user groups

Suppose user-a run the command php magento setup:di:compile, it generated cache file with wrong user group, the wrong user group is user-a(the primary group of user-a), in fact it should be apache(the ...
3
votes
0answers
142 views

Facing issue when running the command php bin/magento setup:upgrade

Facing issue when running the command php bin/magento setup:upgrade The XML in file "D:/wamp64/www/porto/vendor/magento/module-inventory-catalog/etc/communication.xml" is invalid: Element 'topic', ...
3
votes
0answers
30 views

Fatal Error in Magento Command Line

Trying to do a module check from the command line gets me a Fatal Error. I'm using XAMPP to run Magento 2.3
3
votes
2answers
63 views

All necessary commands for Using Magento 2 - For beginner

ALL Basic Commands I am new in Magento 2 but require I necessary commands including bash commands and git command to working with Linux based system ,
3
votes
3answers
2k views

Missing commands for Magento command line

Whenever I run the common commands I get this and similarly named errors: [Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands defined in the "deploy:mode" ...
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?
2
votes
2answers
2k views

Is it possible to get a direct link to the TAR package file of the latest release of an extension?

Everytime I need to download a Magento package, I need to do so via the Connect Marketplace and I then have to copy the URL (key) from there. For example, to download the "Log Viewer" extension, I ...
2
votes
3answers
54 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...
2
votes
2answers
103 views

My live site page has unaligned

It's urgent my live site website has unaligned after running; "sudo bin/magento-cli setup:static-content:deploy" command. All page alignment has changed. Please help to fix this solution. Please ...
2
votes
2answers
321 views

Using Command Lines Magento 2

Dear Magento specialists, I always had Magento 1 running. However for my new webshop I like to run Magento 2. I have installed Magento 2 using Installatron. I extracted theme files in the root ...
2
votes
1answer
541 views

Magento 2 Custom command Area Code note set exception

I have created a command for my module which calls a class Model/Importer from https://github.com/firegento/FireGento_FastSimpleImport2 extension. but i think it requires admin session. I have tried ...
2
votes
2answers
109 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/...
2
votes
2answers
295 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 ...
2
votes
2answers
2k views

Magento 2 auto install shell script

I am wondering is it possible to install Magento 2 with a shell script? Like we run shell script and Magento 2 will be installed automatically? Just like softaculous on cpanel ? Any help will be ...
2
votes
2answers
641 views

What are basic steps for installing a third party theme in Magento 2?

[ Asking for the proper sequence and the basic steps ] Hello, I am beginner to Magento 2, and its folder structure. I am trying to install a theme in M2, and has finally installed. But to achieved ...
2
votes
1answer
744 views

Reindex command line for specific store view

I'm wondering is there any way to re-index the "Catalog Url Rewrites" of a specific store view in Magento with Multiple Stores. Is it possible to have store Id in indexer.php command-line?
2
votes
1answer
269 views

“Area code not set” error. Still getting this error after a lot of search?

First of all, I have to tell you that I have spent a lot of time researching and I have done all the solutions I have came across but I'm still getting this error when I run setup:di:compile The full ...
2
votes
1answer
358 views

Notice: Undefined index: modules in ../Converter.php line 47 - Magento 2 - (Solved)

Hi i am getting error in magento 2 frontend after creating my custom module.(Here mmm2 is my magento directory) a:4:{i:0;s:134:"Notice: Undefined index: modules in /home/vhost/_default/mmm2/lib/...