Questions tagged [command-line]

Denotes questions related to command line.

Filter by
Sorted by
Tagged with
0
votes
1answer
114 views

urgent help fatal error magento 2 website is working but all the styles are gone after running command

need serious and urgent help. i was trying to disable a module in magento2.2 by command line. first i run the command: php bin/magento setup:upgrade and after that i ran the command to disable the ...
1
vote
1answer
424 views

Can't run php bin/magento

Trying to set up a site from production (new to Magento and doing some fixes) and getting this error when running php bin/magento We're sorry, an error occurred. Try clearing the cache and code ...
0
votes
1answer
122 views

Composer stuck in Terminal

When I want to intergrade a new plugin through composer I get an error from a attempt of intergrating a tool through the command line. How do I remove this and try to add the following tool: composer ...
0
votes
1answer
21 views

magento 2.2 where to paste command line

i want to enable my new theme's ( cleversoft novetty theme) extensions. and it wants me to run following command php bin/magento setup:upgrade but as i am new to Magento i don't know where to place ...
6
votes
1answer
1k 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 ...
1
vote
1answer
109 views

Saving a product programmatically errors on duplicate

I've created a command which saves a number of products using // \Magento\Catalog\Api\Data\ProductInterface $product->save() or // \Magento\Catalog\Api\ProductRepositoryInterface $...
2
votes
1answer
316 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/...
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 ...
1
vote
2answers
41 views

Why indexing in command/CLI works?

Whenever I had problems with admin Index Management, I just have to go to the CLI/Command and execute the command line to reindex specific or all indexes to fix the issue. This was suggested by the ...
1
vote
2answers
751 views

Magento 2.2 Command line error after installation

I have installed fresh magento 2.2 which is working fine but command lines are not working. I am using ubuntu. Getting strange error: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not ...
3
votes
1answer
4k 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
877 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 ...
0
votes
1answer
13 views

Magento 2: How to optimize the execution of the CLI?

I run the command php bin/magento many times a day, so I'd like to know if I can optimize the execution of this one? For example: php bin/magento cache:flush
0
votes
1answer
435 views

Magento 2: Too many arguments for install using the command line

I'm trying to install Magento 2 on Debian-system from the command line. And by running: php magento setup:install --base-url="http://localhost/magento2" --db-host="localhost" --db-name="...
1
vote
1answer
76 views

Magento 2 Command Line Issue

Instead of entering each command individually is there a single commande that I can enter to deploy content and to also clear the appropriate folders?
1
vote
2answers
365 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
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 ...
0
votes
1answer
2k views

Anyone know commands for Magento 1

Does anyone know how the following commands would be translated to Magento 1? sudo rm -rf var/cache var/generation var/di sudo php bin/magento setup:upgrade sudo chown -R bitnami:bitnami . sudo php ...
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 ...
0
votes
1answer
301 views

Permission denied when try any command in magento 2.1

When I try to set permissions to folder and files using command like find . -type f -exec chmod 644 {} \; // 644 permission for files find . -type d -exec chmod 755 {} \; ...
0
votes
4answers
607 views

Adding products using a custom CLI command

I've written a custom CLI command to import products from an external database into Magento, however whenever I try to save the product, an Exception is thrown. [Magento\Framework\Exception\...
0
votes
1answer
59 views

Can not export database by command line window

I exported database by command line. I got this error: gzip is not recognized as an internal or external command, operable program or batch file. How to fix it ?
1
vote
2answers
1k 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 ...
2
votes
2answers
309 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 ...
1
vote
1answer
299 views

Find any file using Main.css using Grep Commandline

I'm looking to find a file that contains main.css using grep command line on mac OS/Linux. How do I go about searching a directory using grep for a certain file?
3
votes
1answer
947 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 ...
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/...
1
vote
1answer
520 views

Command line not accepting commands

When I run any M2 command line scripts I get the follow error message: Command line user does not have read and write permissions on var/generation directory. Please address this issue before using ...
1
vote
1answer
715 views

Magento change index mode using command line

I need to change index mode for a particular single index using command line. I have followed this link it allows me to re-index data but when I try to change mode of index, either I get list of ...
0
votes
1answer
18 views

Magento 2 : Custom Module Only Working One Time

I made a custom module to add an extra field into a Magento 2 table. It worked fine when I run php bin/magento setup:upgrade The extra field is added into table. I deleted field, and tried ...
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.
1
vote
2answers
479 views

activate full page caching using Varnish from command line

Is there a way to activate the Varnish use using the command line, not the admin interface? In the bin/magento comand line tool there are options for cache but nothing specific for Varnish. I am ...
1
vote
1answer
474 views

Magento 2: Compile-Multi-Tenant “Not Defined”

My Module reject from Marketplace QA testing. The error they gave was: [ReflectionException] Class \Fanplayr\SmartAndTargeted\Controller\Index\Index does not exist They also let me know test command ...
0
votes
1answer
698 views

Why do CLI commands return no errors/exceptions?

Problem: I'm writing a custom module, and everything is output just fine when there are no errors/exceptions. But as soon as I experience an error, nothing is displayed in the command line (using ...
17
votes
4answers
37k 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.
0
votes
1answer
706 views

Magento 2 console command run from an adminhtml page generates an error — why?

I'm trying to run a Magento 2 console command from within an adminhtml Controller in a custom module. (The module itself is configured correctly, enabled, and running just fine with no errors.) I ...
0
votes
1answer
152 views

Custom commandline script: Area code is not set

I've got a module that was written by a 3rd party developer and unfortunately, they've fallen off of the face of the earth. 99% of it works as required, except one issue. The extension was built to ...
3
votes
1answer
835 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?
1
vote
3answers
1k views

Magento Command Line Global Commands

I am in a Digital Ocean Ubuntu droplet trying to toggle development mode in my Magento installation so that I can develop a theme. My problem is I can't figure out how to run magento deploy:mode:set ...
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 ...
0
votes
1answer
2k views

Updating via SSH: Magento CE 2.1.2 to 2.1.3

I would like to update my Magento 2.1.2 version to the new Magento 2.1.3 via SSH. I have established a connection with my server, but am not sure how to continue. The internet provides me commands ...
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?
11
votes
3answers
4k 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 ...
0
votes
1answer
623 views

run php shell commands

I put my Magento website in a not dedicated server. So, everytime I want to run some php shell commands I have to write an email to my WebHosting tutor and tell him wich commands he has to execute. ...
0
votes
1answer
904 views

M2 - Cannot change deploy mode to Production

I am trying to set the deploy mode on an M2 instance to Production from Developer. On my local environment however I keep getting the error message: Command returned non-zero exit code: '/...
3
votes
3answers
9k 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?
5
votes
2answers
1k 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 ...
2
votes
0answers
168 views

magento setup:upgrade enables module

I've just created a Magento2 module, here is the module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:...
19
votes
5answers
19k 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, ...
2
votes
0answers
48 views

Deploy Sample Data Content to app/code folder instead of vendor

I can deploy sample data to vendor folder with with the command bin/magento sampledata:deploy in Magento 2 however I want to edit this command to deploy sample data to app/code/magento folder instead ...