Questions tagged [bin-magento]

Denotes question regarding Magento command-line interface (bin/magento)

Filter by
Sorted by
Tagged with
0 votes
2 answers
779 views

CLI Error when updating Composer because it requires a Plugin API version ("1.0") that does not match your Composer installation ("2.1.0")

I'm trying to update composer and dependencies but getting this CLI error: The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version (&...
user avatar
  • 181
0 votes
3 answers
694 views

Could not connect to debugging client when running bin/magento commands

I'm using Magento 2.4.1, PHP 7.4, and xdebug 3.0.4. The xdebug is working normally with this setting in php.ini: But whenever I run bin/magento setup:upgrade or any others bin/magento command I ...
user avatar
  • 167
0 votes
0 answers
263 views

bin/magento command giving uncaught exception - fatal error

I have SSH access to a Magento 2 store and attempting to unlock an admin user. I can't run bin/magento or php bin/magento in the folder of the magento instance. How can I get this command to work? I'm ...
user avatar
  • 1
1 vote
0 answers
20 views

How to manage config changes through interface and into version control efficiently

When manipulating config in the interface and wanting to track it into version control, as I see it, there are multiple options and I have doubts with every single one of them. bin/magento app:config:...
user avatar
  • 113
2 votes
3 answers
280 views

Should we set magento to maintenance mode before setup:upgrade and setup:di:compile?

Does executing setup:upgrade or setup:di:compile cause any problems if I execute it in production? I fear that my customers will see errors after I call these commands.
user avatar
  • 2,402
0 votes
0 answers
35 views

Could not open input file: bin/magneto error after every command in magent2.3.3

I have freshly installed magento 2.3.3 but when i am trying to run indexer or any other command i am getting following errors. Could not open input file: bin/magneto I have tried so many commands ...
user avatar
1 vote
1 answer
49 views

How do I get an array of admin menu items?

I am trying to get an array of all registered admin menu items that can be used from a bin/magento command to help choose a parent item to build a child item for. I have tried using \Magento\Backend\...
user avatar
  • 263
5 votes
1 answer
932 views

php bin/magento app:config:dump gives me [Magento\Framework\Exception\ValidatorException] Path "app/etc" cannot be used with "app/etc"

I'm trying to change some settings, and this answer has already been very helpful. But now php bin/magento app:config:dump gives me [Magento\Framework\Exception\ValidatorException] Path "/var/...
user avatar
  • 311
1 vote
2 answers
2k views

The value you set has already been locked. To change the value, use the --lock-env option

I'm trying to do php -f bin/magento config:set dev/js/enable_js_bundling 1 But I get: The value you set has already been locked. To change the value, use the --lock-env option. What does this ...
user avatar
  • 311
1 vote
4 answers
3k views

Calling bin/magento return an exception

I have a Magento 2.3.0 website that works correctly but suddenly (maybe after a products import, but also other various activities were done) when I try to call ANY (reindex, deploy...) command of "...
user avatar
  • 336
1 vote
3 answers
2k views

Magento 2.3 - php 7.2.10 - Reindex error - bin/magento is not opening -

MacOS High Sierra MAMP php webserver - 7.2.10 /Applications/MAMP/bin/php/php7.2.10/bin//php- 7.2.10 -- usr/bin/php - 7.1.16 Nittns-MacBook-Air:~ baanallc$ cd /applications/MAMP/htdocs/23/ Nittns-...
user avatar
  • 11
2 votes
1 answer
2k views

remove 'pub/' folder for URLs from command line

For increased security, we configured the DocumentRoot for our Magento application to be in the pub/ directory of the Magento installation, as described in the official documentation. However, there ...
user avatar
  • 648
0 votes
0 answers
427 views

Magento 2: InvalidArgumentException There are no commands defined in the "cache" namespace

I have facing issue while run command. I can't use any bin/cli commands in magento 2. I keep getting below generic error messages. Error: InvalidArgumentException There are no commands defined in ...
user avatar
  • 317
2 votes
4 answers
1k views

Magento 2 why always need to run static content deploy every after upgrade?

I'm using Magento 2.2.6 version, I already set to developer mode, but when I ran setup:upgrade, and when I open my Magento project the css and js not loaded. But after I ran setup:static-content:...
user avatar
1 vote
1 answer
942 views

Magento 2 bin folder missing can't run any cli commands

I am working on a client's shop, and the bin folder is missing, how can that be possible? Can I recreate it with the files inside? Its a noob question but I never faced this issue... -rw-r--r-- 1 ...
user avatar
  • 35
0 votes
1 answer
954 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': ...
user avatar
1 vote
1 answer
105 views

Magento 2 : var/Generation Magento Tutorial

Can you Suggest any tutorial for var/generation and Patterns in Magento 2. Please Provide video Related materials. Thanks
user avatar
1 vote
1 answer
1k 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 ...
user avatar
0 votes
0 answers
83 views

Upgrading to 2.2.3 /bin is then empty

I want to upgrade from 2.2.2 to 2.2.3 and I ran the following commands composer require magento/product-community-edition 2.2.3 --no-update composer update Then when I try to do php bin/magento ...
user avatar
  • 2,429
2 votes
1 answer
791 views

Magento2 : Theme scripts symlinks not created in developer mode

I'm struggling with an issue for hours now and I really don't get it. I'm using Magento 2.2.1 in developer mode and my scripts symlinks are not created. Here is my project structure --app/ ----...
user avatar
3 votes
2 answers
6k views

Magento 2 run php bin/magento without command line [duplicate]

I have Magento 2 store and I need to run php bin/magento setup:upgrade. But the problem is that client has just a basic webhosting, so there is no command line. Is it possible to create php file that ...
user avatar
0 votes
0 answers
35 views

Magento just loading frontend

Anyone who experience that your frontend website is just loading just like this? But the backend works properly. this is a Magento 2.2 platform. I am stuck on this please anyone can help me? thank ...
user avatar
1 vote
0 answers
62 views

Component dependency failure on 2.2 upgrade

Please view the attached image for details: When I want to install update from my Magento marketplace, it gives me the attached error.
user avatar
0 votes
1 answer
4k views

Static Deploy gives error

When I do the this php bin/magento setup:static-content:deploy it gives me error of [Magento\Framework\Exception\LocalizedException] NOTE: Manual static content deployment is not required in "...
user avatar
18 votes
3 answers
51k views

Magento2 - setup:di:compile

I have been working in a project with some custom code... this is our first "medium" Magento 2 project, so (as all people here I think) every day we learn new things, and we have to change the way to ...
user avatar
  • 3,317
5 votes
4 answers
2k views

Magento 2: Installing with Redis by Default

Magento 2's CLI has a setup:install command that will let you generate an initial configuration php bin/magento setup:install --admin-email astorm@example.com --admin-firstname Alan --admin-lastname ...
user avatar
  • 43.5k
2 votes
3 answers
4k views

/bin/magento file cannot be opened (Magento 2.1)

I am trying to find my way to reindex the system using cli (in cms graphical interface on save and schedule corn jobs did not work). Diverse commands were tried: - php /bin/magento indexer:reindex [...
user avatar
  • 41
3 votes
2 answers
2k views

How to activate and setup full page caching using Varnish from command line

Is there a way to activate the Varnish use using the command line, not the admin interface? In the bin/magento comand line tool there are options for cache but nothing specific for Varnish. I am ...
user avatar
0 votes
2 answers
601 views

Can't deploy Magento2 theme locally on MAMP

I am supposed to rework a front end design of an existing Magento2 website, I already have a local installation of Magento2 on MAMP with composer. I used my project's git repo so all the files in app/...
user avatar
1 vote
2 answers
2k views

Magento 2.1.2 - PHP Parse Error in Bootstrap.php when trying to execute bin/magento commands

Can't seem to find a fix for this issue. I'm running Magento 2.1.2 with PHP 7.0.16, however there are different versions of PHP installed on different websites on the same VPS. When trying to execute ...
user avatar
3 votes
2 answers
6k views

Error when running bin/magento setup:upgrade after creating Module on Magento 2

I'm trying to create a module on a local installation of Magento 2.1.4. i'm getting this error when running bin/magento setup:upgrade: [Zend_Db_Adapter_Exception] SQLSTATE[...
user avatar
0 votes
2 answers
1k views

Enabling a module for the first time via admin panel

I have created a very simple module. I can see it listed as disabled when I check via cli php bin/magento module:status, but when I go to admin panel Advanced -> Advanced I do not see it listed ...
user avatar
0 votes
2 answers
2k views

How to change /usr/bin/php to /Applications/AMPPS/php/bin/php on magento?

When I try to run "which php" from my magento root folder , this say: /usr/bin/php But, I need that this point php to: /Applications/AMPPS/php/bin/php How can I do it?
user avatar
  • 103
0 votes
1 answer
1k views

"Zend_Json_Exception Decoding Failed: syntax error" on module:enabled

When I try to enable my module with bin/magento module:enabled I am getting an error in console: Zend_Json_Exception Decoding Failed: Syntax error How can I fix this? When I enabled the same ...
user avatar
  • 1,595
15 votes
2 answers
45k views

When exactly to use php bin/magento setup:upgrade

There are lots of situations in which I change some files in my module in the developer mode but the changes didn't take place in frontend until I run php bin/magento setup:upgrade Just wanted to know ...
user avatar
3 votes
2 answers
8k views

After upgrading to php 7 bin/magento CLI commands not working Magento 2.0.2 CE

I've upgraded the php version of the apache2.4 server from 5.6 to 7.0. OS version Ubuntu 14.04 LTS. After this update, despite the fact that I've installed php7.0-cli, when i try to run php7.0 bin/...
user avatar
5 votes
1 answer
1k views

Magento 2: Command to Clear view_preprocessed

Is there a Magento 2 bin/magento command to clear the var/view_preprocessed cache/pre-process folder without doing a full static asset refresh? The cache:clean command doesn't clear this folder.
user avatar
  • 43.5k