Run multiple Magerun instances at once

In the past I already wrote articles about the very genius tool Magerun from Netz98, that I nearly use on every Magento project.

Recently I had the challenge to run three instances of Magerun on the same physical server with only one shell account. This was necessary because I ordered a big cluster from maxcluster for a staging environment for multiple Magento projects. Therefore I got only one single ssh account to maintain all projects via ssh.

Luckily I always use bash aliases to shorten my calls for complex shell commands.

So I could easily implement these three bash aliases in my ~/.bash_profile file on the server (or~/.profile, ~/.bash_aliasses, … -> depends on Linux version):

That’s it! As you can see, there are three new commands, that call different Magerun instances at different paths in the file system. With the help of the –root–dir  parameter the distinct  Magerun instance knows wich Magento should be used for its operations.

Further information on Magerun:

Leave a Reply

Your email address will not be published. Required fields are marked *