Questions tagged [cli]

Denotes questions related to CLI which is a short form of Command-Line Interface

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

Area Code is not set when working in CLI command class and run di:complie

i am working in command class, when i inject a class in constructor and run di complie, it gives error of "area code is not set", when i remove injected class form the constructor then my ...
Uzair Masood's user avatar
0 votes
0 answers
56 views

Area code not set error in magento 2

I have created one custom command. That command is used when i need to generate some specific file. When i run setup:upgrade command then i give me error like "Area code not set". Below is ...
Nikhil Ajani's user avatar
3 votes
1 answer
149 views

PhpAmqpLib Broken pipe or closed connection during index reindex

I ran this command below in my Adobe Commerce Cloud 2.4.6 to reindex it. MAGE_INDEXER_THREADS_COUNT=$(nproc) php -d memory_limit=-1 bin/magento i:reindex Then I got these error messages that suddenly ...
Rafael Corrêa Gomes's user avatar
1 vote
3 answers
410 views

Many of the commands are missing in CLI

I have installed a latest magento version 2.4.6 on my machine. The setup is complete, but I can not able to execute most of Magento's commands. If I do php bin/magento it gives me only below list of ...
Jaimin Sutariya's user avatar
0 votes
2 answers
353 views

How to set an encrypted configuration value using the standard Magento CLI?

I'm trying to use the Magento2 config:sensitive:set CLI command to set a sensitive configuration value, but Magento is throwing the following error: There are no sensitive configurations to fill I've ...
slavko's user avatar
  • 33
1 vote
0 answers
71 views

magento 2 list-inconsistencies gets killed

I'm using the the command: bin/magento inventory:reservation:list-inconsistencies -r | bin/magento inventory:reservation:create-compensations However the first part gets killed, and so this is piped ...
Jonas de Herdt's user avatar
0 votes
1 answer
184 views

php bin/magento setup:upgrade SHOW ERROR : Connection "default" is not defined

Setup upgrade command not running. The issue is given below in screenshot.
Alok Tiwari's user avatar
0 votes
1 answer
485 views

Magento: 500 Internal Server Error after upgrading to 2.4.4

The store front shows 500 Internal server error after I followed all instructions in the article here to upgrade Magento. On checking the version of Magento with the command bin/magento --version ...
CodeForGood's user avatar
0 votes
0 answers
131 views

Apply .htaccess rule for controller and cron

I have some long-running scripts that should bypass the "Connection Timeout" set up in LiteSpeed. I want to do it in the .htaccess file and it works if I apply this rule (*RewriteRule . - [E=...
Kloppo's user avatar
  • 95
1 vote
2 answers
545 views

List of All Magento 2 Configuration Files

Magento 2 uses XML-based configuration files A LOT. When studying Magento or preparing for an exam, it is useful to have a list of all config files used in Magento 2. How can such a list be generated? ...
Simon's user avatar
  • 5,695
0 votes
1 answer
650 views

CLI command without option name

I know how to create custom CLI commands with input parameters like: bin/magento customers:syncbyid --id=69, but I'd like to know how (if even possible) I can create a command with an option without a ...
Stefan Teunissen's user avatar
0 votes
3 answers
147 views

Proper etiquette when enabling/disabling extensions in production mode?

What is the proper protocol for enabling a custom built extension during production mode? When I run php bin/magento setup:upgrade I get the following error: The directory "/chroot/home/af3d0522/...
Adrift's user avatar
  • 325
0 votes
1 answer
90 views

how can i run setup:upgrade and cli commands on windows

Hello everyone in my case i have installed Magento 2.3.4 on Windows and i need to run setup:upgrade like on Ubuntu , but it's not working for me , is this issue because on Windows we have backslash '' ...
code 8's user avatar
  • 5
0 votes
1 answer
41 views

Admin input value is not accessible after adding the order increment ID while executing the command

I created a custom CLI command where I have to delete the order Items using the Order Increment ID, Item SKU. I used the ask() method after executing the command php bin/magento webkul:orderDelete ...
Manoj Jarial's user avatar
0 votes
1 answer
57 views

magento2 add address to customer via cli

Using Create new customer using CLI like admin approved method as a base I have been pulling my hair out on how to extend it so I can also add an address to the created user via CLI. any assistance is ...
lostnconfused's user avatar
0 votes
0 answers
145 views

magento 2 run comand and error showing it

when I have run upgrade command or run deploy command and below type error coming it php -dmemory_limit=5G bin/magento setup:upgrade Error: Path "." cannot be used with directory "...
Jaydip Patel's user avatar
0 votes
1 answer
38 views

Problem with multiple themes deploy in Magento 2

When I execute CLI command: php bin/magento setup:static-content:deploy. It always has only 4 steps themes, but now I have multiple duplicate themes while running the command. frontend/Magento/blank/...
kogutu's user avatar
  • 1
0 votes
2 answers
276 views

Magento 2 custom CLI file thrown error when call function from block?

What I do wrong in my cli command file? thrown error when try to clean cache like this "There are no commands defined in the "cache" namespace." class Hicustomer extends Command ...
NoOn's user avatar
  • 65
0 votes
1 answer
483 views

how to call function from cli command magento 2

How can call function from block to cli command magento 2 here is my cli command class class Hicustomer extends Command { protected function configure() { $this->setName('...
NoOn's user avatar
  • 65
1 vote
2 answers
1k views

Magento Cloud CLI cURL error 60: SSL certificate problem: certificate has expired

I am working on macOS Big Sure 11.6 and since Friday(01.10.) I face an issue with my Magento Cloud CLI. I was working without problems and out of a sudden, this error occurred. Has anybody faced ...
Th. Schott's user avatar
0 votes
1 answer
31 views

Programatically mass change product prices

I am writing a module that uses a cli command get a csv file and use that to change the prices of a selection of products based on sku and new price retrieved from an CSV file. I have the logic for ...
AndrewRMillar's user avatar
2 votes
0 answers
925 views

Magento 2.3 -> 2.4: CLI commands all throw "Area code is not set"

The story so far: I'm updating Magento from 2.3 to 2.4 and in doing so I'm now getting an "Area code is not set" when running any CLI command. This did not happen in 2.3 and after looking at ...
Higgs's user avatar
  • 21
0 votes
1 answer
96 views

Magento or Apache 2 Permission?

I have a vm where I run ubuntu 18.04 , Apache 2 and Magento 2.3 every thing works fine but I think I'm doing something wrong with my permissions. So I have added to user 'dev' to the www-data group (...
BigJonna's user avatar
0 votes
1 answer
449 views

Issues connecting Magento Cloud to Bitbucket

Following the Bitbucket integration guide, I provided all the required permission to the Auth Consumer, and I log out and log in again with my Magento Cloud CLI, but even though I keep having this ...
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
32 views

Magento 2.3.5 - Could we configure our installed module fields via Magento 2 CLI?

Could we actually configure our installed module fields via Magento 2 CLI? For example: # typical way to enable a Magento 2 module, via Magento 2 CLI bin/magento module:enable Acme_Acme # can we do ...
Brian Ng's user avatar
0 votes
1 answer
36 views

magento cli error after module installation by composer

i use magetno 2.2.3 . the bin/magento cli is working fine until I add a module by composer require [module name] --ignore-platform-reqs.after that it gives me a long term error : so how should I ...
sina Dabbagh's user avatar
0 votes
1 answer
911 views

magento cli not working for any command and gives a long error

i have magento 2.2.3 . for deleting cache or enabling modules or any other usage of magento cli i take one error . it begins with this phrase Unknown package has no name defined and it is continuing ...
sina Dabbagh's user avatar
0 votes
1 answer
366 views

How to verify from CLI that Magento was installed successfully?

I'm running the setup:install command in an automation script to perform the initial Magento installation. How to determine in another script (POSIX sh) that the previous run of this command has been ...
Alexander  Pravdin's user avatar
0 votes
1 answer
2k views

Trying to install Magento 2.4.1 using command line ? What is elasticsearch host?

I got this example command from the guide (tutorial) - https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli.html#install-cli-example bin/magento setup:install --base-url=http://...
Vibhore Jain's user avatar
0 votes
1 answer
36 views

Magento 2 SSH reindexing not working? [duplicate]

I just installed a Magento 2.3.6 version. and I tried to run the Command Reindexing but it's not working. I tried with diff commands like cache clear and flush none of the commands are not working ...
Nikhil Kumar Gantyala's user avatar
0 votes
0 answers
67 views

Magento migration 1.9.3.1 to 2.3.5 p2

When i doing migration from magento 1.9.3.1 to magento 2.3.5 p2 getting this error. And after search this related issue i deleted some database tables but again and again i getting this issue on ...
Rohan Rock's user avatar
2 votes
1 answer
89 views

Unable to execute cli magento commands

An abstract factory could not create an instance of magentoframeworkappdeploymentconfig(alias: Magento\Framework\App\DeploymentConfig). Above error appears on di compile, cache clean etc. I am not ...
Hamendra Sunthwal's user avatar
0 votes
1 answer
176 views

giving error "Too many arguments, expected arguments "command"." while installing magento 2.4

gatting error "Too many arguments, expected arguments "command"." while installing magento2.4 through command line.
vinaysirige's user avatar
1 vote
1 answer
223 views

usage of ShellInterface in Magento 2

I used exec() function to run the magento commands. As exec() is not recommended used the below code . class Test{ protected $_shell; public function __construct( \Magento\Framework\...
Manjunath's user avatar
  • 177
0 votes
0 answers
137 views

Magento CLI Install Error Megento_Catalog

I'm trying to install Magento 2.3 from the terminal and I find the following error, does anyone know how to fix it? In PatchApplier.php line 170: ...
Cristopher Quispe's user avatar
1 vote
2 answers
422 views

Magento 2 - bin/magento not working after update to magento 2.4.1

I just updated my magento from 2.4.0 to 2.4.1 via composer. But now bin/magento does not work anymore. If I execute php bin/magento list then nothing happens. I figured out that a error_log file was ...
Black's user avatar
  • 3,150
0 votes
1 answer
589 views

composer error when running bin/magento

When I try to run a bin/magento command, I get this error: Composer file not found#0 /var/www/html/vendor/magento/framework/Composer/ComposerFactory.php(47): Magento\Framework\Composer\...
Ismail's user avatar
  • 1
1 vote
1 answer
326 views

install Magento-Cloud cli at local question

I am trying to install Magento-Cloud cli to my local, however I am not familiar with the server setup, I did read thru the documentation from Magento. but I don't get it work. Please help, I am not a ...
Paul Fan's user avatar
  • 614
0 votes
1 answer
289 views

CLI Resize ends with "Killed"

I'm trying to resize all the images in my 2.3.4 Magento database. I have about 100 images to resize. When I run the command line instruction, bin/magento catalog:images:resize , it comes back with a ...
Jeffrey Marks's user avatar
0 votes
1 answer
782 views

Access denied for user 'root'@'localhost' (using password: NO)

I'm trying to install Magento 2.4.0 and I keep getting the "Access Denied" for user: 'root'@'localhost' (using password: NO) I'm using Wamp64 Web Server to configure it and using Mysql 8.0....
Jacman's user avatar
  • 181
0 votes
0 answers
37 views

Why package depencies error is coming in Magento 1.9. please explain

I am working on my eCommerce website called cravestore.in. My magento version is 1.9.4. I am not able to install any extensions from Magento Connect & Mage terminal both. I don't know how to fix ...
Salman Dalal's user avatar
2 votes
1 answer
1k views

Magento CLI 2.4.0 - ErrorHandler is turning PHP errors into exceptions in production mode

Preface: I prefer to develop in developer mode, have Magento catch all PHP E_NOTICE|E_WARNING|etc. errors, throw exception on them, and get these issues cleaned up before committing my code. The issue ...
Darren Felton's user avatar
0 votes
2 answers
299 views

Log in from magento cli?

On Drupal I often log in using drush uli. It opens a one-time login URL in my browser. Is it possible to log in to the Magento backend with bin/magento?
the's user avatar
  • 331
0 votes
5 answers
4k views

How to install Magento 2.4

I try install fresh magento 2.4 but always available setup wizard but currently I not see setup wizard in this version. https://prnt.sc/u8eeoi How to install magento 2.4 ?
Sylvester's user avatar
  • 2,184
0 votes
3 answers
883 views

Table prefix error when running - setup:db-declaration:generate-whitelist

I've run the command php bin/magento setup:db-declaration:generate-whitelist --module-name={Vendor_Module} and receive the following error... Magento was installed with a table prefix. Please re-...
Eddie's user avatar
  • 139
4 votes
3 answers
5k views

No Administrators role was found, data fixture needs to be run

am trying to create an admin user from the CLI while running the commands I get the following error:- # php bin/magento admin:user:create --admin-user=pramod --admin-password=pramod@123 --admin-email=...
Pramod's user avatar
  • 1,939
3 votes
3 answers
1k views

How to run php function directly after a specific Magento 2 CLI command?

For the sake of simplicity, let's say I want to echo out "Hello World" (in reality i want to do a lot more) directly after anyone runs php bin/magento setup:di:compile. In the latest version ...
John's user avatar
  • 827
0 votes
2 answers
113 views

Magento2 - Run composer require without cli

I don't have access to ssh on my cpanel. How is it possible to run composer require(composer require razorpay/magento) without any cli interface?
Haerriz's user avatar
  • 681
0 votes
1 answer
203 views

CLI command to switch off Redis cache

There is CLI command to set up Redis as backend for Magento cache: $ ./bin/magento setup:config:set --cache-backend=redis Does any CLI command exist to switch off Redis as cache backend for Magento?
Alex Gusev's user avatar
  • 1,999
2 votes
1 answer
1k views

Can not create an instance of magentoframeworkappdeploymentconfig

I get this error when i try bin/magento comand from CLI An abstract factory could not create an instance of magentoframeworkappdeploymentconfig(alias: Magento\Framework\App\DeploymentConfig) how can ...
Altravista's user avatar

1
2 3 4 5
7