Magerun is a very useful commandline tool for dealing with daily Magento development problem like:

  • clean / flush caches
  • reindexing the indices
  • set configuration values in the database (core_config_data)
  • shorthand query syntax for database accesses

It’s developed by netz98 ( and made my daily business so much easier.

Installation (Linux)

GIT repository and docs can be found here:

If you want to run Magerun in an Apache context, you have to tell your Apache, that .phar is an executable php file ending:

F.e. Apache configuration:

To use Magerun everywhere in your file system, you can define a bash_alieas.

F.e.: .bash_alias under Debian / Ubuntu
 The parameter root-dir depends on your Magento project root directory.


Updates can be done vial Magerun itself:

Usesage examples

Here are some examples for the power of this tool:

  • Reset Admin Password
  • Set system config value
  • Dump system config
  • Clean caches
  •  Flush cache storages
  • Query database
  • Run step wise setup scripts
  • Reindex

More information


One thought on “Magerun

Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.