Sys Commands

sys:check

Checks Magento System

  • Checks missing files and folders
  • Security
  • PHP Extensions (Required and Bytecode Cache)
  • MySQL InnoDB Engine

Usage:

$ n98-magerun.phar sys:check

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:cron:history

Last executed cronjobs with status.

Usage:

$ n98-magerun.phar sys:cron:history

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:cron:list

Lists all cronjobs

Usage:

$ n98-magerun.phar sys:cron:list

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:cron:run

Runs a cronjob by job code

If no job argument is passed you can select a job from a list. See it in action: http://www.youtube.com/watch?v=QkzkLgrfNaM

Usage:

$ n98-magerun.phar sys:cron:run [job]

Arguments

job

Is required:
No
Is array:
No
Description:
Job code
Default:
n/a

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:info

Prints infos about the current magento system.

Usage:

$ n98-magerun.phar sys:info

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:maintenance

Toggles maintenance mode.

Usage:

$ n98-magerun.phar sys:maintenance [--on] [--off]

Options

–on

Description:
Force maintenance mode

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–off

Description:
Disable maintenance mode

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:setup:compare-versions

Compare module version with core_resource table.

Compares module version with saved setup version in core_resource table and displays version mismatch.

Usage:

$ n98-magerun.phar sys:setup:compare-versions [--ignore-data]

Options

–ignore-data

Description:
Ignore data updates

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:setup:run

Runs all new setup scripts.

Runs all setup scripts (no need to call frontend). This command is useful if you update your system with enabled maintenance mode.

Usage:

$ n98-magerun.phar sys:setup:run

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:store:config:base-url:list

Lists all base urls

Usage:

$ n98-magerun.phar sys:store:config:base-url:list

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:store:list

Lists all installed store-views

Usage:

$ n98-magerun.phar sys:store:list

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:url:list

Get all urls.

Examples:

  • Create a list of product urls only:

    $ n98-magerun.phar sys:url:list –add-products 4

  • Create a list of all products, categories and cms pages of store 4 and 5 separating host and path (e.g. to feed a jmeter csv sampler):

    $ n98-magerun.phar sys:url:list –add-all 4,5 '{host},{path}' > urls.csv

  • The "linetemplate" can contain all parts "parse_url" return wrapped in '{}'. '{url}' always maps the complete url and is set by default

Usage:

$ n98-magerun.phar sys:url:list [--add-categories] [--add-products] [--add-cmspages] [--add-all] [stores] [linetemplate]

Arguments

stores

Is required:
No
Is array:
No
Description:
Stores (comma-separated list of store ids)
Default:
n/a

linetemplate

Is required:
No
Is array:
No
Description:
Line template
Default:
{url}

Options

–add-categories

Description:
Adds categories

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–add-products

Description:
Adds products

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–add-cmspages

Description:
Adds cms pages

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–add-all

Description:
Adds categories, products and cms pages

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

sys:website:list

Lists all websites

Usage:

$ n98-magerun.phar sys:website:list

Options

–help

Description:
Display this help message.
Shortcut:
-h
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–quiet

Description:
Do not output any message.
Shortcut:
-q
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–verbose

Description:
Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Shortcut:
-v|-vv|-vvv
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–version

Description:
Display this application version.
Shortcut:
-V
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–ansi

Description:
Force ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-ansi

Description:
Disable ANSI output.

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–no-interaction

Description:
Do not ask any interactive question.
Shortcut:
-n
Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a

–root-dir

Description:
Force magento root dir. No auto detection

Shortcut:

Accept value:
No
Is value required:
No
Is multiple:
No
Default:
n/a