Released n98-magerun Version 1.93.0


The year is nearing its end fast and we have bundled a new n98-magerun release for you. The version contains some new commands, enhancements (listed at the end of the post) and updated Symfony components to 2.6.

New Features

Unlock Admin User

Any user of the Enterprise Edition had this. If have enabled automatic user locking you must wait some time
if user will be unlocked.
Now you can unlock any user with the new admin:user:unlock command.

  • #399 Admin user unlock [EE only] (by Steve Robbins)

Clean multiple caches at once

It’s now possible to pass more than once cache identifier to the cache:clean command.

  • #415 Clean multiple caches at once (by Michael Barrett)

Better Cache Handling

Alan Storm optimized the cache initialization. I some cases we recreated the already initialized cache. This is now fixed.

  • #418 Use already instantiated cache object. (by Alan Storm)

Enable/Disable Module (by definitions)

Enable or disable a module in app/etc/modules/*.xml by name or codePool:

Examples with codepool option:

Please not that the codepool option affects ALL modules of the codepool.

  • #421 enable or disable a module based on name or codepool (by Steve Robbins)

DB-Status / Variables

Cyrill Schumacher added two new command to the db namespace.

db:variables -> Print all important MySQL variables


db:status -> Print status informations like the current used InnoDB Buffer Pool hit rate.


  • #435 New db:status and db:variable commands (by Cyrill Schumacher)

Refactored bash completion script

On some platforms the current version of the bash complection script is not working. Johannes Klein provided a refactored bash completion script which contains a workaround for some problematic PHP versions.
We got also a patch by Paweł Bogut which is not needed anymore because we can provide a command list which is parsable without a regex.

Other Improvements

  • Minor documentation corrections (by Jaik Dean)
  • Refactored db:maintain:check-tables to allow InnoDB and Memory tables to be optimized. (by Cyrill Schumacher)
  • Bash completion – change regexp condition to string contains. (by Paweł Bogut)
  • Updated Symfony components to V2.6
  • Updated locked phpunit version.
  • #423 db:import –drop does not take into account the “only-command” option (by Michael Lühr)
  • #429 Install command ignores skin folder of sample data (by Vinai Kopp)
  • #436 Alternative Installation Port is not respected (by Christian Münch)
  • #440 Added Magento CE to installer (by Rouven Rieker)
Magerun Tips

Dynamically disable n98-magerun commands

In some cases you like to disable your commands i.e if you are running n98-magerun on a production machine or if it doesn’t support the entire operating system.
The symfony command component have a simple solution for that. All commands are extended from the symfony command base class Symfony\Component\Console\Command which defines the method
isEnabled for that. The method must return a boolean value.

If you want to disable a command for older n98-magerun versions (interesting for module developers)
you can do it like this:

If you want to disable a command for a operating system you can use a utility class which is available inside of n98-magerun (We will provide a additional post for the utility classes in the future).

Or the hostname (here hardcoded):

You can see it’s pretty simple to disable a command.

Happy coding!