1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Magmi command line

From magmi

Jump to: navigation, search

Contents

Magmi CLI interface

magmi can be launched from command line once configured by its UI page

As soon as you configured magmi and saved a profile , magmi cli interface can be used.

How to run

  • go to magmi/cli directory
  • launch magmi cli with the following command line syntax
php magmi.cli.php [-profile=<yourprofilename>] [-mode=[update|create|xcreate]]
  • all parameters are optional

Parameters

  • -profile=xxx , xxx should be an existing saved profile. if -profile is not set magmi will run with "Default" profile
  • -mode=[update|create|xcreate] , if -mode is not set magmi will run in "update" mode

mode values

  • update : will skip non existing skus & update existing ones
  • create : will create new products for non exisiting skus, will update existing ones
  • xcreate : will create new products for non exisiting skus, will skip existing ones

Useful Hint

Magmi Import Url UI plugin has an option to give the command line to use for current edited profile in the UI ;)

Example

Say you want to run profile "myprofile" in mode "create" (ie: create new, update existing)

php magmi.cli.php -profile=myprofile -mode=create

Advanced syntax : profiles plugins parameters override

Magmi CLI enable to override plugins parameter from profile

This feature could be particularly useful for CSV Datasource parameters, enabling to switch input files.

This feature could be used to override ANY plugin parameter for plugins that are selected in the profile.

Example

  • Same as above but forcing csv file to "/home/myuser/toto.csv"
php magmi.cli.php -profile=myprofile -mode=create -CSV:filename="/home/myuser/toto.csv"



Back to Magmi Wiki

Personal tools