How to install Magmi

Table of Content

Magmi is simple but yet powerful tool which allows to import products in Mangento store in seconds. It has separate interface and can work with native Magento configuration.

In the article it will be described how to install Magmi using composer.

The latest version of Magmi not been released, so we need to add next configuration to composer.json to have possibility to use the latest version.

"require": {
  "magento-hackathon/magento-composer-installer": "3.1.*",
  "aydin-hassan/magento-core-composer-installer": "~1.0",
  "magento/core": "1.9.4.4",
  ...
  "dweeves/magmi": "dev-master"
  ...
},
"repositories": [
  {
    "type": "composer",
    "url": "https://packages.firegento.com"
  },
  ...
  {
    "type": "vcs",
    "url": "https://github.com/dweeves/magmi-git.git"
  },

Run composer update and wait a bit:

composer update

Following instruction will describe how access Magmi under vendor/ directory and save configuration to app/etc/magmi. This allow to have configuration in one place and don’t afraid to lose it.

  1. Go to your root project directory
    cd /path/to/magento
  2. Create folder for save Magmi configuration
    mkdir -p htdocs/app/etc/magmi
    mkdir -p htdocs/app/etc/magmi/{conf,state,plugins}
  3. Make links to have all configuration in one place. If you delete Magmi package in some reason, you won’t lose your configuration at least.
    ln -s htdocs/app/etc/magmi/conf $(pwd)/vendor/dweeves/magmi/magmi/conf
    ln -s htdocs/app/etc/magmi/state $(pwd)/vendor/dweeves/magmi/magmi/state
    ln -s htdocs/app/etc/magmi/plugins $(pwd)/vendor/dweeves/magmi/magmi/plugins
  4. The next command allows to use Magento configuration to access to the database.
    echo -e '[DATABASE]\nconnectivity="localxml"\n[MAGENTO]\nbasedir="../../../../../htdocs"\n[GLOBAL]\nstep = "0.5"\nnoattsetupdate = "on"\n' > htdocs/app/etc/magmi/conf/magmi.ini
  5. Prepare the base Magmi configuration to make it possible import CSV files.
    echo -e '[Magmi_CSVDataSource]\nCSV:importmode = "local"\nCSV:basedir = "var/import"\nCSV:separator = ","\nCSV:enclosure = ":DQUOTE:"\nCSV:headerline = "array"\n' > htdocs/app/etc/magmi/conf/Magmi_CSVDataSource.conf
  6. Last but not least, create a link to Magmi web interface. It allows you access Magmi directly through your Magento store domain without any change in the web server configuration.
    ln -s $(pwd)/vendor/dweeves/magmi/magmi/web/ htdocs/magmi

That’s all, now you can access new Magmi thought your domain, for example http://example.com/magmi/magmi.php. It’ll ask credentials, just type ones that you use to access Magento admin panel.

Leave a Reply

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