The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1answer
15 views

CLI command to change env.php 'downloadable_domains'

Is there a CLI or rest interface that can modify the downloadable_domains section in env.php, or do I have to just manually run a sed or awk on the file during my deployment process Thanks (BTW, ...
0
votes
1answer
35 views

Magento 2 I want to run below command line for every minutes

I'm using magento2.3 Here when create bulk action from product grid schedule not started and updated. I got solution for the above issue when I run this command above issue fixed. So I want to run ...
0
votes
1answer
39 views

Fatal error: Uncaught Error: Class 'Cli' not found in bin\magento:30

I wanted to install a new extension in my store and I keep on getting this error in CLI. An exception was raised while creating "Application"; no instance returned#0 Sites\XXXXX\vendor\zendframework\...
0
votes
3answers
55 views

upgrading magento project from Magento 2.1.12 CE to Magento 2.3.2 CE setup:upgrade doesnt work

Dear Magento developers, I am trying to to upgrade Magento 2.1.12 CE To Magento 2.3.2 CE I followed official dev docs instructions https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade....
0
votes
0answers
59 views

Magerun not recognized on command line

I am unable to run magerun from the CLI on one of my Commerce cloud sites. How do I fix? here is the error: var/magerun db:dump --compression="gzip" ./var/mg_integration_before_sync.sql.gz PHP ...
0
votes
1answer
96 views

Magento 2.3.1 Product EAV index throws error with GTID consistency

when I run reindex Command After Below type error showing SQLSTATE[HY000]: General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be ...
0
votes
0answers
53 views

Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Event\mb_strtolower() in magento 2

when i run cli commends I'm getting error Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Event\mb_strtolower() in /home/project/public_html/vendor/magento/framework/...
0
votes
0answers
58 views

Magento 2.3 - Fixing “Cannot redeclare __()” error

Getting error PHP Fatal error: Cannot redeclare () (previously declared in /vendor/magento/framework/Phrase/.php:15) in app/functions.php on line 22 This error is coming while running ...
1
vote
2answers
84 views

Magento 2 - Area code not set when running script via command line CLI

I have created module for exporting my product data to script outside of Magento2. This is my Data.php <?php namespace Oktarin\Nabavanet\Helper; class Data extends \Magento\Framework\App\Helper\...
0
votes
0answers
61 views

magento dev:urn-catalog:generate command fails to detect secret file

I'm running the following command "magento dev:urn-catalog:generate .idea/misc.xml " to use the functionality of Magento 2 to automatically resolve all my URN's so PhpStorm will stop giving me ...
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
0
votes
2answers
81 views

Set production mode magento 2.3

I want to switch to production mode but I can not find information about the exact commands that I have to use. I know that I must use this command: php bin/magento deploy:mode:set production But, ...
0
votes
1answer
113 views

Magento 2 - Import Product .csv via CLI

Actually, the desired requirement is quite simple. I would like to control and execute the import from the backend of the Magento 2 system via the CLI. This question was asked some time ago (2016) ...
2
votes
2answers
58 views

Installing extension via Composer

I have tried to install the extension via Composer and successfully installed. After installing, I can see the extension menu in the admin panel. However, I can't see any files in the app/code ...
2
votes
2answers
34 views

While trying to Reindexing through the command prompt generate error

Command I used : php bin/magento indexer:reindex
2
votes
1answer
91 views

How to run command CLI in Magento 2

I'm facing the same problem as MagentoProblem this link. It is about messy frontend and backend of Magento 2. This happened after i set https://(My_Domain_Name).com into Configuration > Web > Base ...
1
vote
1answer
29 views

Magento\Catalog\Helper\Image returns unsecure product image url in custom CLI command

I am using Magento's image helper class to try to get a product's image url in a CLI command: $this->image->init($product, 'product_page_main_image_default')->getUrl(). When I use this code ...
3
votes
2answers
121 views

Magento 2 - Custom shell command not working

I want to execute some code using custom command like: php bin/magento mycommand:dothis To enable this command I have added this code in di.xml <type name="Magento\Framework\Console\CommandList"&...
1
vote
0answers
66 views

Upgrade from Magento 2.2.6 to 2.3.1 CLI Command Error

When upgrading from Magento CE 2.2.6 to Magento CE 2.3.1, I am following the command line upgrade as explained here. All was well and the commands ran just as they should have until I ran the ...
1
vote
0answers
103 views

Magento 2.3: How to configure magento CLI commands to use custom names for dangerous redis commands

Environment OS: Ubuntu 18.04 LTS Server: Apache 2.4 Database: MySQL v14.14 distribution 5.7.25 PHP: 7.2 Redis: 5.0.4 Issue Following the digitalocean tutorial referenced ...
0
votes
1answer
51 views

Magento 2 circular dependancy error on upgrade

I'm currently running a website on Magento 2.2.7 When we add any new module and run the php bin/magento setup:upgrade command the admin panel immediately stops working and gives us an error beginning ...
1
vote
0answers
19 views

Magento 2 : How can we identify phpexecutable or not?

I'm working on creating custom console in which i have to add code that will check php is executable using below class. If PHP executable then which PHP version is executable. SyncCommand.php ...
1
vote
1answer
116 views

Command line user does not have read and write permissions on generated directory. Please address this issue before using Magento command line

My Magento site is down and I see main.CRITICAL: Cannot write to the "/var/www/html/var/debug/db.log" file. Unable to write {"exception":"[object] (Magento\Framework\Exception\...
1
vote
2answers
122 views

Magento 2 - Syntax error on bin/magento support:backup:db

I am trying to get backup of DB using following command php -dmemory_limit=1G bin/magento support:backup:db It is giving me syntax error: sh: 2: Syntax error: word unexpected (expecting ")") Error: ...
0
votes
0answers
30 views

Why di compile not working with 100% in magento 2? [duplicate]

I have Magento 2 setup But when I run cmds: php bin/magento s:up Next then I ran php bin/magento s:d:c Every time try this without error it will be moved to next How I can solve this? My ...
0
votes
2answers
49 views

Area Code not set, caused by programatically creating shipment

While creating a module, the following error occurs after creating a custom cli command: Area code not set: Area code must be set before starting a session. I have already stated the area code in ...
2
votes
1answer
69 views

Getting a CLI error when trying to compile

I am getting this error on terminal: PHP Fatal error: Class 'Cli' not found in /opt/bitnami/apache2/htdocs/bin/magento on line 31 when trying to run these commands: sudo php bin/magento setup:...
1
vote
0answers
12 views

Magento2 2.3 Update Error Requirements not satisfied

When i try to run "composer update" i am getting following errors. PHP 7.1.20 Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for ...
3
votes
1answer
252 views

Magento 2.2.5 After Upgrade To 2.3 CLI commands don't work

I upgraded magento version by documentation, after upgrade this happens: When running php bin/magento cache:flush or any other bin/magento command error appears There are no commands defined in the "...
2
votes
1answer
86 views

How I can solve the di:compile error in Magento 2?

When I run setup:di:compile I got error Errors during compilation: Vendor\CustomRegistration\Model\Customer\DataProvider Incompatible argument type: Required type: bool. Actual type: \Vendor\...
0
votes
1answer
18 views

Error related to Framework in Magento 2 SSH CLI

I'm currently running a Magento 2 (2.2.7) site and I've been getting the following error in the CLI when I enter certain commands (usually to do with enabling/disabling modules). The directory "/...
7
votes
3answers
1k views

Magento2 which command Run and when to Run

Kindly Clear Difference Between php bin/magento cache:flush and cache:clean and when they need to Run . which tasks Output to need cache:flush or clean ** and which task need these Commands => **di:...
1
vote
1answer
68 views

Magento 2 how to set proper file and folder permission in localhost ubuntu 18?

i'm using magento 2 in local setup in ubuntu 18 when every time i run cmds php bin/magento s:s:d -f php bin/magento s:up php bin/magento s:d:c the file permission changed how to give proper ...
1
vote
2answers
32 views

CLI to find out what version my modules are?

When I run a bin/magento list it doesn't say anything specific about finding out the schema and module versions. Does anyone know how to figure this out using command line?
2
votes
1answer
182 views

why my magento 2 localhost setup in very slow?

When i run cli cmds it's take to much time >php bin/magento s:s:d -f frontend/Magento/luma/en_US 2918/2918 ===100% % 10 mins frontend/Solwin/kosmic_child/...
0
votes
1answer
577 views

Removing modules from vendor magento 2.3

I'm trying to remove a few modules located inside the vendor folder. If i remove them manually it throws an error on the frontend. Warning: require(/srv/public_html/vendor/composer/../amzn/amazon-pay-...
0
votes
0answers
68 views

CSS failing to compile

Whenever I run the cmd via terminal to compile assets my CSS is being churned out with the following error error evaluating function `darken` The first argument to darken must be a color index: 2570 #...
0
votes
2answers
186 views

Magento 2 change colours

I am trying to change the colours from the standard Magento 2 blank theme via the _theme.less file. I currently have the following file structure /public_html/app/design/frontend/GladiatorFitness/...
0
votes
1answer
108 views

How do I restore Magento Cloud environments deleted by GitHub integration?

I followed the instructions to setup a GitHub integration with my Magento Cloud Pro project. This project has not been made live yet, but has been in development for several months and therefore has ...
0
votes
1answer
101 views

How to walk through a collection with pagination

I working on a command line which is fetching all the products in the database, using the Magento\Catalog\Model\ResourceModel\Product\CollectionFactory object. In order to avoid memory problems, I'm ...
0
votes
1answer
59 views

Magento 2 localhost wamp cron jobs

I'm still getting the error on my admin page "One or more indexers are invalid. Make sure your Magento cron job is running" All field indexes rebuild successfully apart from Catalog Search. I'm using ...
0
votes
2answers
409 views

“Could not open input file” error while running php command in windows

I have installed Magento 2.2.5 on my loaclhost windows system. I use wamp server. I am unable to run any php command and getting the error Could not open input file: C:\wamp64\www\magento2 I got this ...
0
votes
3answers
907 views

Magento 2.3 Useful SSH CLI Commands List [duplicate]

list of magento 2 SSH CLI Commands what is magento ssh cli command for Upgrade? what is magento ssh cli command for Cache Clean? what is magento ssh cli command for Cache Flush? what is magento ...
0
votes
0answers
48 views

when I ran setup:upgrade command then error showing in magento2

php version is = 7.0.32 I am getting this error after upgrade my magento site from 2.2.1 to 2.2.7 when I ran setup:upgrade command then below error showing Cache frontend 'default' is not ...
1
vote
1answer
355 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 ...
0
votes
0answers
448 views

Catalog Search indexer process unknown error

I'm getting a 'One or more indexers are invalid. Make sure your Magento cron job is running.' and it seems I need to run php bin/magento indexer:reindex from the CLI. I get the index rebuilt ...
2
votes
2answers
185 views

display all customers using console command magento2.2.3

How to display registered customers in terminal using custom console command?Can anyone please help me out.
6
votes
2answers
3k views

Magento2.3 setup:upgrade error

After being able to update magento to 2.3 (which was a pain by itself) I managed to get to the part where the database needs to be updated. Which is in current state when I try to run the command bin/...
0
votes
1answer
38 views

Magento 2: Batch for CLI-commands

I am often using the following commands one after another: php bin/magento setup:upgrade php bin/magento setup:di:compile Now I am wondering if it is possible to create a batch-command (like in old ...
0
votes
1answer
319 views

Magento 2.1.15: Compilation error: Class Magento\Framework\Serialize\Serializer\Json does not exist

I did the following command on the CLI of a Magento 2.1.15 installation: php bin/magento setup:di:compile -vvv The following exception occurred: [RuntimeException] ...