I can't run any bin/magento commands, always got killed. (setup:di:compile, cache:clean, cache:flush, indexer:reindex)


I already changed memory_limit = -1 the php.ini, and tried to run the bin/magento commands with specified memory size; but all return "Killed" like the above picture.

I also tried to clean var/log/* generated/* var/cache/* folders, but still same.

Anyone know how to fix this issue?

Thanks so much

  • Just a sidenote if I may: I suggest you don't run any of the bin/magento commands with the *root user. you should always use same user as the webserver (usually www-data), otherwise you will mess up the permissions.
    – Diana
    Commented Feb 16, 2021 at 8:21
  • 1
    thank you, I will be careful Commented Feb 16, 2021 at 23:10
  • I am not clear with the answer can you explain more
    – senthil
    Commented Sep 28, 2021 at 9:27

2 Answers 2


it's the base_url. I set it to null in database directly, problem is fixed after I added value.


  • Hi, you can also accept your own answer, to mark it as resolved. Thanks.
    – sv3n
    Commented Feb 17, 2021 at 1:04
  • either secure base or unsecure base URL, can you explain little bit more
    – senthil
    Commented Sep 28, 2021 at 9:27

in my case the problem was because of removed generated/.htaccess


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.