n98-magerun 2 development started


As already posted on MageHero we started the development of a seperate n98-magerun version for Magento 2.
We decided to create a complete new version and against some other options like to create a “clone command” or sperate lib inside the same phar file.

The purposes are:

  • The phar file will be too big (> 4MB)
  • The Magento 2 framework is too different
  • We need a clean development start
  • Maintenance!

If you like to test the current unstable development version you can checkout the existing source code on github.

Please note that all development is done in develop branch.
During development we don’t create any phar file inside the git repository.
Pull requests are only accepted for develop branch.

You can checkout everything by running this commands:

It’s a good idea to create an alias.

After that you can run “n98-magerun-dev2” in your Magento 2 test installation.


Released n98-magerun Version 1.92.0

We have deployed a new n98-magerun version with only one new command but many improvements which makes the
tool more stable in daily usage.

New features/optimizations

Disable root warning


It’s now possible to supress the “It’s not recommended to run n98-magerun as root user” warning.
This can be useful i.e. during a deployment which runs as root-user. In this case you can create
a system wide config on the remote host in file “/etc/n98-magerun.yaml” with this content:

  • #332 make WARNING_ROOT_USER configurable/optional (by Christian Münch)

Remove setup resources

Removes the entry for one or all module resource setups. This command is useful if you want to re-run an install
script again possibly due to debugging. Alternatively you would have to remove the row from the database manually.

  • #392 Add remove setup resource command (by Aydin Hassan)

Create dummy users with addresses

A new option was added to the customer:create:dummy command which allows automatic address creation.


  • #397 Added option to create dummy customer with an address (by Gilles Doge)

Better observer list

A new event area “crontab” was added. All events are now sorted and the type of the observer is visible in the table.


  • #413 Enhanced dev:module:observer:list (by Cyrill Schumacher)


  • #387 Unlink sym-linked folders instead of recursively removing (by Aydin Hassan)
  • #390 Some documentation updates (by Aydin Hassan)
  • #391 Fixed broken filters in dev:module:list command (by Tjerk Ameel)
  • #393 Optimize failing on long lines (by Alexander Menk)
  • #400 Added adminhtml_cache_refresh_type event (by Marc Päpper)
  • #403 Sys setup incremental tiny fixes (by Cyrill Schumacher)
  • #407 Check for Enterprise_PageCache presence before using it (by Vinai Kopp)

Other updates and fixes

  • Changed db:dump strip settings (by Alexander Menk)
  • Updated 3rd party components (Symfony, PHPUnit, Twig)

Please update to the latest version by:

I hope the new version let you more efficient in the daily work with Magento. Have fun!


Interview in Regalsprecher-Blog about n98-magerun development (German)

I gave an interview in the german Blog Regalsprecher about
the start of n98-magerun development and the ideas behind the tool.
The blog post is written in german. If you are able to understand the beautiful german language we would be happy if you can leave a comment.

The post can be found here:


HarrisStreet ImpEx for Magento

This article is part of a series covering 3rd party n98-magerun modules/extensions.

In this post we show you another great module to manage your Magento configurations. It supports importing and exporting of store config data in a hierarchical folder structure. This can be done for different environments.

The module was created by Zookal pty ltd the largest student portal in Australia.


Released n98-magerun version 1.91.0

We are happy to present you a new stable release of n98-magerun.
The new release contains many new features and some enables users of Microsoft Windows some features which was only
available for MacOS/Linux users.

Let’s see what we have changed since the last release…

Remove Admin-Users and Customers

We have two new commands to remove admin (backend) users and (frontend) customers.

Customers can be deleted by a ID range or by defining a email address.


As analog command we have the new command to delete an admin user:

  • #370 Remove Admin Users (by Aydin Hassan)
  • #380 Customer delete command (by Michael Woodward)

Better Microsoft Windows Support

We added support for user config and n98-magerun modules.
Now you can add your own user specific config in %userprofile% folder. To make it a little bit easier we removed the leading
dot which is normal on Unix but could produce problems on Windows machines.
A system wide config is also possible under the path %windir%\n98-magerun.yaml

For an overview please refer the wiki pages:

Generate model method for magic getter/setter

We added our first command to a new command namespace “code”. The namespace is designed to add code generator command to n98-magerun.
We start with a command to generate getter/setter of models.

Before (do not use this with code models):




  • #376 New command dev:code:model:method (by Cyrill Schumacher)

Change Resource Versions

A very useful new command sys:setup:change-version allows you to set the version of a single resource setup or of all
resource setups of a module from cli.

  • #382 Change module version command (by Michael Woodward)

Other fixes and enhancements

  • #299 Removed header if format parameter is passed (by Christian Münch)
  • #303 Please warn instead of blocking input (by Christian Münch)
  • #315 sys:setup:run on enterprise requires admin session. (by Thorsten Essig and Christian Münch)
  • #362 db:import –optimize: Cut line in 8MB pieces (by Alexander Menk)
  • #367 Exclude sessions from @stripped (and therefore @development) (by Aaron Brady)
  • #368 Skip sys:setup:incremental’s Version Check (by Alan Storm)
  • #369 get use_rewrites/use_secure from config (Kristof Ringleff)
  • #352 Added –stop-on-error option. (by Christian Münch)
  • #372 print root warning to std_error (by Edward Rowley)
  • #373 Refactored local-config:generate command (by Rouven Rieker)
  • sys:info command: Added row count for main entities (by Christian Münch)
  • sys:setup returns exit status code “1” if setup fails (by Christian Münch)
  • Updated 3rd party components (Symfony, PHPUnit, Twig)


Please run n98-magerun.phar self-update to fetch the new version.


LimeSoda Environment Configuration

This article is part of a series covering 3rd party n98-magerun modules/extensions.

The next article presents a solution to manage several developer, staging, production environements with a n98-magerun module and and a Magento module (can be installed at once).
If you have multiple Magento environments i.e. for all your developers you know the problem. Someone dumps a database and share it with another developer. Now every developer runs in the same boring issue. Changing the configuration according to the current environment. The list of configurations grows and grows… You know the problems.

At this point the solution of Limesoda can help you.


You need to install the file directly in your Magento installation via modman.

After the installation you must define the name of your config environment. This can be done in config.xml (in this case
the app/etc/local.xml file).

Define your dev-environment:

Default environment

Create a new Magento module to define a config. Add a global > limesoda > environments node to your config.xml file.

This was easy! We have our first default environment defined.

Now we can run n98-magerun with the new embedded command.

The output is currently empty, because our environment has no commands defined.

Define commands

Now we extend the previous config and add some n98-magerun commands. You can call every n98-magerun command as batch.

This calls two config settings and a cache flush sequentially.

Using variables

If you look at the previous example you see that we used the same url two times. Let’s create a varible for that and see how simple is is to use a variable.

Run n98-magerun again and you should see that output:

Nesting environments

This was very cool, but nesting the environments is really hot!
Let’s do it.
You can do it by adding the attribut parent to your environment definition in XML.

A typical setup could be:

Now we define this setup in our config:

The command processes your configs recursivly. That’s the power of the LimeSode Environment Configuration module.

If you like this way to manage your environments give the modules a change.
You can fetch the module from github.


MageRun Addons by Kalen Jordan

This article is part of a series covering 3rd party n98-magerun modules/extensions.

Kalen Jordan (creator and founder of MageMail) is one of our longest n98-magerun users and contributors.
He was the first who published a 3rd party module with some nice commands. That’s what i like to present you now (mostly copied from module README).

You can find the module here:

Installation is really simple:

Bust Frontend Browser Caches

This command modifies the skin and js base URLs with a timestamp-specific URL, so that browsers will pull down fresh CSS and JS.

It’s intended to be used in conjunction with a web server rewrite rule that will rewrite, for example:


Create dummy order

This command can create some dummy orders. It’s marked as experimental but could help you to create dummy data in your shop i.e. for performance tests.

Assign order to new customer

This command can assign an order to a new customer by ID.
This is very experimental – doesn’t modify all of the places that customer data exists on the order models, such as the shipping and billing address – just the customer name, email, ID on the order entity.


Assigns the order #10000000001 to customer ID 10.

Anonymize customer data

Anonymize customer data across a bunch of tables: order, order address, newsletter, quotes, newsletter subscriber.

Core file diff / Theme diff

This command can diff core files to see if they have been modified.
The command depends the command line tool diff which should be installed on all unix based systems.



Same functionality for theme files:

See what customizations have been made in your custom theme against the base theme.

Grab mailchimp unsubscribes

Grab all of the mailchimp unsubscribes to your primary list

If you’re using Ebizmarts_MageMonkey to manage your Mailchimp integration, this will allow you to grab a list of all of the unsubscribed emails to your primary list.

The main purpose for doing this is if you need to import these unsubscribes somewhere. The routine will dispatch an event mailchimp_list_unsubscribe_discovered which you can observe in order to handle them.

Uninstall a module

ninstall a module by deleting all the module’s files and removing database tables.

NOTE: This is not fully baked yet, at the moment it just deletes the main module config file and the code directory. Pretty trivial, but I’m going to add in database tables, layout files, template files, etc.

Generate gift card codes

The missing tool to generate EE gift card codes!


Cache Backend Benchmarking with n98-magerun

cache_benchmarkThis is the start of a series which presents 3rd party n98-magerun modules.

The first one is a module which helps you to benchmark your shop cache system.

It’s a port of a benchmark script by Colin Mollenhour
which was a fork of a symlink cache script by Vinai Kopp.


The installation is really strait forward:


After the installation you should see some new cache commands in your n98-magerun command list.

First run “cache:benchmark:init” which generates cache entries.
The init command can has a lot of paramters.

No panic. The command defines default values for every setting.

After the generation you should see a bash script like “bash var/cachebench/default/” which was
generated by the init command.

Run the shell script an see the your benchmark statistics.
Now you are able to compare different cache backends (change it in your app/etc/local.xml config).

See it in Action


Germany’s number 1 Magento Gold Solution Partner looking for new developers

netz98_News_Teaser_MagentoGoldPlatz1Our team is looking for additional Magento developers in Mainz or Würzburg, Germany.
netz98 is Germany’s number 1 Magento Gold Solution Partner and has the highest number of Magento certified developers.

Why not join us?


MageStack with native n98-magerun support


Users of the MageStack Magento Operating System can now easily and quick install n98-magerun.
MageStack supports n98-magerun natively and provides a install shell script.

Further instructions can be found in the blog of Sonnasi Hosting.