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 MS-DOS-systems) to run the commands with one command. Any idea?

1 Answer 1


You may just separate the commands by semi-colon and run them on CLI, as simple as that. The set of commands get executed one by one.

$php bin/magento setup:upgrade;php bin/magento setup:di:compile;
  • If you are looking for some other way to do it, just let me know
    – nikin
    Commented Dec 2, 2018 at 13:32
  • This is really cool, many thanks: Works like a charm! Commented Dec 2, 2018 at 15:37

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.