Questions tagged [command-line]

Denotes questions related to command line.

0
votes
1answer
19 views

Custom Console command creation error in Magento 2

I am creating console command to input values into the database, there is some argument missing an error. I have gone through several tutorials but to me, the code looks fine. The error is: Not ...
0
votes
0answers
34 views

Magento2: setup:di:compile issue

Got the error below when I run the setup:di:compile command [Magento\Framework\Exception\LocalizedException] Source class "\Magento\Framework\EntityManager\OperationInterface" for "Magento\...
1
vote
2answers
39 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
1answer
44 views

SSH “Could not open input file: bin/magento” in Magento2

I try to install: https://www.magesolution.com/front-end-cms-page-builder.html in Magesolution document told run ssh command: unzip -o Extension_Package_Name.zip but the problem is when run unzip -...
2
votes
0answers
23 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
0answers
23 views

How to fix “There are no commands define in the namespace” error?

I have upgraded the Magento version from 2.2.6 to 2.3.0 via composer. I have tried running the command php bin/magento setup:upgrade but it says the below error There are no commands defined in the ...
2
votes
2answers
100 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 ...
0
votes
1answer
21 views

Magento 1 : Get product collection using command line throwing error

I have a script file like getproducts.php & have placed it under script/getproducts.php. I want to get products collection in my script file. code in my file: <?php require_once('../app/Mage....
1
vote
0answers
21 views

Plesk Hosting Magento 2 commands not working

I'm Using Plesk Hosting Magento 2 installed but i can't use commands any kind of command not working. i'have tried many different commands all gives error some can advice will be highly appreciated.
0
votes
0answers
14 views

How to create symlinks to all source files after changing git branch?

I am working in git workflow. I want to know how I can create symlinks to source files after changing git branch? Let's say I have three root source files in my theme that are located as below. app\...
1
vote
0answers
40 views

How to change admin secure value and generate integration keys for api?

I've developed a script which sets up my magento installations from scratch to production mode with ssl etc. I have on tiny problem and that is, I am not sure which command to use in order to change ...
0
votes
4answers
39 views

Magento 2 indexer:reindex Command Not Working

when i run command php bin/magento indexer:reindex it don't reindex all indexers. but when i run php -dmemory_limit=6G bin/magento indexer:reindex the the following error Please advice your ...
2
votes
2answers
108 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/...
1
vote
2answers
27 views

Magic Method unsItemName()

I'm trying to use an unset magic method to delete a row from the table. Following is the line of code from execute method of my CLI command. $item->unsEquipmentName($input->getArgument(self::...
1
vote
1answer
25 views

Magento 2, plugin for MaintenanceEnableCommand does not get executed

Considering below in etc/di.xml: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type ...
0
votes
1answer
55 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
2answers
172 views

Magento 2 - bin/magento Commands not working in Cpanel Terminal

I have an issue while try to run commands bin/magento in terminal. Commands not working. No command run after bin directory. You can see the below screenshot about the error. Basically yesterday I ...
1
vote
1answer
169 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 ...
1
vote
1answer
106 views

Create admin user in magento 2 using commmand line [closed]

create admin user using command line... php bin/magento admin:user:create --admin-user='username' --admin-password='password' --admin-email='admin@admin.com' --admin-firstname='Admin' --admin-...
5
votes
2answers
662 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.
2
votes
2answers
207 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
43 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 ,
5
votes
1answer
128 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/...
0
votes
1answer
31 views

Magento 2 - Module Instalation without CLI

Hey guys I have created a php file in the public_html folder and writed the following code: <?php system('php bin\magento module:enable Wisedat_PDFInvoiceFile'); system('php bin/magento setup:...
1
vote
1answer
174 views

Magento 2.2.5 shell script PHP Memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes)

I have a magento 2 script which runs through shell so to not have a timeout issue. It uses php multi curl request and it was running fine. But recently asked our hosting server to increase the PHP cli ...
4
votes
2answers
452 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.
0
votes
0answers
25 views

while creating custom module upgrade command not working and all other commands not working before it works at the time of magento2 installation

its showing one message- Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html
2
votes
2answers
257 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 ...
1
vote
0answers
33 views

Magento 2 : Error on running magento command

I'm new on Magento 2. (2.2.5, nginx, linux, MySQL 5.7.22, PHP 7.1.21) I was setting the configuration of store and when I refreshed the store page I get diamond question marks, also in admin console, ...
2
votes
3answers
1k 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" ...
0
votes
0answers
27 views

N98 magerun url rewrites command issue - Magento 1.9x

I am using the n98-magerun version 1.101.1 for my Magento 1.9x version. When I execute this command php n98-magerun.phar rewrites:analysis:top then it shows [Exception] Table 'my_database....
0
votes
1answer
151 views

Magento 2 Command line through error in developer mode

In production mode, my website is working fine. But as soon as I enable developer mode, I can not use command line any more. In developer mode, if I use for example php bin/magento cache:flush, I'll ...
0
votes
1answer
348 views

SSH Command Line Error on fresh install of Magento 2.2.5 on Bitnami

I have tried numerous installations of magento on Bitnami and I keep getting the below error when trying to upgrade using 'sudo php /opt/bitnami/apps/magento/htdocs/bin/magento-cli setup:upgrade': ...
0
votes
2answers
222 views

Command line fails with “Area code is not set” after upgrading to 2.2.3

Custom module takes a dependency on \Magento\Framework\Message\ManagerInterface and calls $this->messageManager->getMessages()->getErrors(); after calling other commands. When this is called ...
1
vote
1answer
625 views

Installing Magento 2.2.4 on windows localhost using xampp

I am trying to install Magento 2.2.4 on windows localhost using XAMPP. My XAMPP is installed I C:\xampp7.1 To use command line I using Command prompt in C:\xampp7.1\php> And the following ...
0
votes
2answers
66 views

How to enable extensions through terminal?

Is there a way to enable and disable extensions in version 1.x via the command line? How can I enable an extension through terminal? What is the command?
1
vote
1answer
69 views

Mganeto2: CLI commands dealing with languages

In My Store I am using two languages en_US and ar_SA. But, unknowingly I ran this command php bin/magento setup:static-content:deploy es_MX. Something like this, other language which I was not ...
1
vote
1answer
2k views

Magento2 reindex via cron job

I have a store with 300k products, I set up the reindex to be "Update by Schedule", But I don't know what is the best way for reindexing, Should I do this manually by SSH command every 24 hours by ...
5
votes
1answer
591 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/...
1
vote
1answer
118 views

Magento 2 : How to create our own bin script [duplicate]

I am trying to create my own script to be placed in my extension /bin folder so that once I finished it, it should work in this way bin/mycommandname my-customcommand instead of running the ...
0
votes
1answer
105 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
397 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
108 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
103 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
262 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
723 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 ...