Questions tagged [command-line]

Denotes questions related to command line.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Executing indexes concurrently. Any negatives?

Because reindexing takes so long, I am contemplating running several reindex commands concurrently, via the CLI, see below: php bin/magento indexer:reindex catalog_category_product & php bin/...
A. Andersen's user avatar
1 vote
1 answer
73 views

Magento 2 Command Not working

Earlier My site was working properly but suddenly it threw the below error. Also, When I tried to run the command it threw the below error. Can anyone give us a solution on How to fix it? and run ...
Keval Chauhan's user avatar
0 votes
3 answers
32 views

Magento 2.3.2 Incompatible argument type

Error in during compilation: 6/7 [========================>---] 85% 33 secs 395.0 MiB Daniels\Cform\Model\ResourceModel\Post\Grid\Collection Incompatible argument type: Required type: \Magento\...
Daniels HC's user avatar
1 vote
1 answer
171 views

How to use chmod -R 777 var/ pub/ generated/ in windows CMD command line

'chmod' is not recognized as an internal or external command I am trying to use this command on windows cmd for Magento permissions but this not working can anyone tell me how to use this command on ...
Hamza Hussain's user avatar
1 vote
2 answers
481 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
  • 43
1 vote
1 answer
208 views

Difference between cache clean and cache flush?

I am not satisfied what is difference between below 2 command : 1. php bin/magento cache:clean. 2. php bin magento cache:flush.
Alok Tiwari's user avatar
0 votes
1 answer
422 views

Composer\Downloader\FilesystemException Filesystem exception:

As I ran the command composer require -w as part of the process to upgrade Magento 2.4.2 to 2.4.4, I found the error seen in the image below. Below is the article I'm referring to upgrade Magento. ...
CodeForGood's user avatar
4 votes
1 answer
829 views

magento 2.4 difference between input argument and option in console commands

on magento 2 when we create a console command, we can add arguments and/or option. But what is the difference between the two? In which cases should we use one or the other?
Lou Nik's user avatar
  • 433
0 votes
1 answer
79 views

Magento 2.4.3 p1 command line Area code is not set

I've a custom command line module as follows: <?php namespace Test\MosIntegration\Console; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use ...
hkguile's user avatar
  • 2,221
0 votes
1 answer
727 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
1 answer
207 views

Update Product Stock and Price by uploading CSV using Command Line

I am updating products stock and price by uploading CSV in adminform magento2. I want to perform the same thing using command line. Is it Possible ? How ?
Syed Hassan Zamir's user avatar
0 votes
1 answer
32 views

Does anyone know when the three commands under Magento2 will be available

Does anyone know when the three commands under Magento2 will be available? php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content
sq y's user avatar
  • 127
0 votes
1 answer
40 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
3 votes
7 answers
791 views

How to enable Two-Factor Authentication in Magento 2?

How do I enable it for all account types in Magento 2? Anyone, please help me with how to enable the Two-factor Authentication module using a command line.
Kuldeep Sharma's user avatar
1 vote
0 answers
22 views

Tabulation added to commands and downloaded file beginning

I don't know when it started happening so I don't know where to look. For example if I run a command it shows like php bin/magento indexer:reindex Design Config Grid index has been rebuilt ...
Rui Silva's user avatar
  • 374
0 votes
1 answer
530 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
0 votes
0 answers
329 views

After upgrading PHP 7.2 to 7.3 php command line not working. bin/magento must be run as a cli application error

After upgrading the hosting plan, php version migrated from 7.2 to 7.3 (server no longer supports 7.2) and I can't run the php commands any more. I have tried all the top 10 solutions on Google to fix ...
Marcony Monteiro's user avatar
0 votes
2 answers
64 views

All of functionality is running , but if this code is on console command execute(), is not working

I am looking for magento 2 developer. I need to build a extension that clear the cart every day by cron job. So I made the extension for this work. all of the functionality is OK on testing mode I ...
Thomas Peters's user avatar
1 vote
0 answers
116 views

An abstract factory could not create an instance of magentoframeworkappdeploymentconfig(alias: Magento\Framework\App\DeploymentConfig)

Help Me. i am using all latest version. During the installation of Magento 2.4 an error appears when creating an admin account: An abstract factory could not create an instance of ...
Rakesh sharma's user avatar
0 votes
4 answers
4k views

Why I am getting error like " Could not validate a connection to Elasticsearch. No alive nodes found in your cluster " on docker with magento 2.4.1

Getting error like - Could not validate a connection to Elasticsearch. No alive nodes found in your cluster I am using docker for magento 2.4.1 while installation i am getting this error. My docker-...
Deepak Rai's user avatar
  • 1,145
0 votes
0 answers
149 views

Magento command line putty

I have Magento 2.3. I have moved the website to another server but all command [php bin/magento setup:upgrade , php bin/magento setup:static-content:deploy -f, and any other command ] on command putty ...
Hassan Kamar's user avatar
0 votes
1 answer
164 views

Which files & folders do I replace in order to upgrade Magento 2 manually?

Which files and folders need to be replaced in the Magneto root folder in order to upgrade Magento 2 Manually? I am running a stock copy of Mangento 2.3.5 on a Ubuntu 18.04 test server. I am trying to ...
fmt's user avatar
  • 33
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,204
0 votes
3 answers
954 views

Magento 2 CLI commands doesn't work

I am having a problem trying to migrate my magento2 board from server to my localhost, I copy the database and files I changed app/etc/env.php config parameters to fit with the local host, I did the ...
Edgar Gomez's user avatar
1 vote
5 answers
758 views

Di compile error while installing Magento 2.3.5

Hi i am installing Magento 2.3.5 but getting error on di:compile command MiBErrors during compilation: Dotdigitalgroup\Email\Model\Apiconnector\EngagementCloudAddressBookApi Incompatible argument type:...
OBAID's user avatar
  • 279
0 votes
0 answers
1k views

Magento 2 commands automatically killed

I am running commands setup:di:compile and cache: clean it's running for while, but after sometime it got killed in magento2.3.2. Please let me know the exact issue for this.
gill's user avatar
  • 329
0 votes
1 answer
86 views

Command line enable / disable static blocks

I would like to be able to enable and disable static blocks via the command line, is there a utility that provides this functionality. My use case is to configure a cron job to periodically enable ...
user1279887's user avatar
63 votes
8 answers
103k views

How to disable Two factor Authentication module in Magento 2.4

How can I disable the Two-factor Authentication module using command-line ?
Softec's user avatar
  • 2,065
1 vote
2 answers
1k views

Install Magento 2 via command line: Getting Error SQLSTATE[HY000] [2054]

I am using Mac OS Catalina and I am trying to install Magento 2 via the command line and I am getting this error. ➜ php bin/magento setup:install --base-url=http://local.magento2.com --db-host="...
Jonathan's user avatar
  • 113
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
1 vote
2 answers
2k views

Can you run a command to re-size only certain image types in Magento2?

The below command will re-size all images based on new specified dimensions: php bin/magento catalog:images:resize Is there a variable to add to run for a certain image type only? For example, ...
MagentoMac's user avatar
  • 1,042
1 vote
1 answer
413 views

Magento 2.3.2: setup:di:compile not working getting out in command line after 14%

Hey there i am trying to run command setup:di:compile . its getting started but and stopping for sometimes on 14% and then its gettin out back to cli. i am not getting any error or exception so that ...
Sayyed Hasan's user avatar
0 votes
1 answer
623 views

Magento Stuck at running command

My Magento command for compile is stuck What should I do and what is the problem??
Anonymous Record's user avatar
0 votes
2 answers
478 views

Error while upgrading Magento 2.3.3 to 2.3.4

When I run the Setup Upgrade Command. Getting below error Notice: Undefined index: column in /vendor/magento/framework/Setup/Declaration/Schema/Declaration/SchemaBuilder.php on line 196
Kushal Dani's user avatar
  • 2,104
0 votes
2 answers
415 views

store logo in not loading

I am overwriting my theme logo in my child theme with the default.xml file but the logo is not loading in the storefront. This is my default.xml code: <referenceBlock name="logo"> <...
mobz's user avatar
  • 117
0 votes
2 answers
343 views

Error running the `setup:di:compile` command Magento 2.3.0

Run:: /opt/plesk/php/7.2/bin/php -dmemory_limit=3G bin/magento setup:di:compile Error screenshot:: Any one can help me
DK Thakur's user avatar
  • 362
0 votes
0 answers
171 views

Random error while creating storefront theme

Hi everyone I'm new to magento, few days ago I installed magento and now I was developing a sample storefront theme. But before i configure and install it, I just started facing an unknown error both ...
mobz's user avatar
  • 117
0 votes
0 answers
234 views

Invalid argument type in Magento 2.3.4 in third party module register page

I am getting an issue while compiling in a command line. I am using Magento 2.3.4 version (latest version). I was tried to add a customer repository interface class and passing the parameters in the ...
Jdprasad V's user avatar
0 votes
2 answers
421 views

How can I use ssh command using php script as root user?

I am working third party integration for which new files generating automatically when my code is running. But it required permission after creating the file. I want to give the permission as a ...
Vinod Kumar's user avatar
  • 2,045
0 votes
1 answer
43 views

Magento Cloud - how to set my key for magento

How do I setup New Relic license key for my magento on the magento cloud? I don't use Magento CLI often magento-cloud variable:set php:newrelic.license AAAAAAAAAAAAAAAAAAAAAAAAAAA I execute above by ...
Paul Fan's user avatar
  • 654
0 votes
1 answer
294 views

Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) i

I am getting error while running the cli commands, I increased the memory_limit to 5G
vinaysirige's user avatar
1 vote
0 answers
89 views

Image Resize Command Issue in Magento 2.2.X

I have Magento 2.2.x running website which is having more than 50K products and each product has up to 27 additional Images. When we run resize command (bin/magento catalog:images:resize), it takes ...
Oscprofessionals's user avatar
0 votes
1 answer
1k views

Magento 2 : how can we use of setup:db-schema:upgrade?

Can we add or update the database schema and if yes, so can anyone give example?
Kushal Dani's user avatar
  • 2,104
2 votes
1 answer
352 views

How do I execute Magento 2 CLI commands using a custom script?

I had created a custom script which update my database. After completion of database update, I want to execute the Magento CLI commands by adding custom functions in my custom script. The script ...
IntraPersonalLearner's user avatar
1 vote
2 answers
3k views

How to export products using command line

How to export products along with all attributes & images/video using command line?
Shailesh's user avatar
  • 133
2 votes
1 answer
451 views

Magento 2.3.3 Incompatible argument type

Interception cache generation... 6/7 [========================>---] 85% 50 secs 351.0 MiBErrors during compilation: Vendor\Module\Model\ResourceModel\Brand\Collection Incompatible ...
Ravindrasinh Zala's user avatar
1 vote
3 answers
2k views

How to Disable Inventory Management In Magento 2.x

It may be necessary to disable Inventory Management modules to: Speed up the upgrade process for merchants migrating from 2.0.x, 2.1.x, or 2.2.x to 2.3.x. Use custom or third party inventory and ...
MountainX's user avatar
  • 240
3 votes
2 answers
1k views

How to use config:sensitive:set command in Magento 2 CLI?

I notice there are two commands, config:set to Change system configuration and config:sensitive:set to Set sensitive configuration values. I learned Sensitive configuration values hold restricted or ...
Milan Chandro's user avatar
0 votes
1 answer
96 views

No command works in Magento 2.x

I used sudo php bin/magento setup:upgrade command but get [InvalidArgumentException] There are no commands defined in the "deploy:mode" namespace. after ...
MGPM's user avatar
  • 741
1 vote
1 answer
2k views

Magento 2 Maintenance Mode IP filtering not working

I hope you can help me with this issue. I already enabled the maintenance mode and set up the IP filter, but it's not working. Although I configured to access the site with my IP I'm unable to see ...
msrz85's user avatar
  • 21