Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

Denotes questions related to command line.

0
votes
0answers
19 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
11 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
37 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
106 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
24 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
43 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
121 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
138 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
82 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
555 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
185 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
42 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
123 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
30 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
157 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
425 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
220 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
25 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
134 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
319 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
205 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 ...
0
votes
1answer
610 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
56 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
66 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
544 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
97 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
99 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
378 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
104 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
20 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
94 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
247 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
942 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
704 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 ...
2
votes
1answer
3k 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
783 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
387 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
73 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
337 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
1k 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 ...