FG Magento to WooCommerce


This plugin migrates your Magento products and CMS pages to WooCommerce.

It has been tested with Magento versions 1.3 to 2.2 and WordPress 5.2. It is compatible with multisite installations.

The plugin migrates:

  • the product categories
  • the product categories images
  • the products
  • the products tags
  • the product thumbnails
  • the product images galleries
  • the product stocks
  • the CMS

No need to subscribe to an external web site.

FG Magento to WooCommerce Premium version

The Premium version includes these extra features:

  • migrates the product attributes
  • migrates the product variations
  • migrates the grouped products
  • migrates the products Up Sell and Cross Sell
  • migrates the users
  • migrates the customers
  • authenticate the users and the customers in WordPress with their Magento passwords
  • migrates the orders
  • migrates the ratings and reviews
  • migrates the discount coupons
  • migrates the SEO meta data
  • migrates the tax classes
  • SEO: redirects the Magento URLs
  • multisites/multistores: Option to choose which website/store to import
  • update the already imported products stocks and orders
  • compatible with Magento Enterprise Edition
  • ability to run the import automatically from the cron (for dropshipping for example)

The Premium version can be purchased on: https://www.fredericgilles.net/fg-magento-to-woocommerce/

Add-ons for FG Magento to WooCommerce Premium

The Premium version allows the use of add-ons that enhance functionality:

  • Multilingual Magento stores converted to WooCommerce + WPML
  • Move Magento order numbers
  • Move Magento customer groups
  • Move Magento manufacturers
  • Move Magento product options as add-ons
  • Move Magento costs
  • Move Magento custom order statuses
  • Move Magento bundle products


  • English (default)
  • French (fr_FR)
  • Brazilian (pt_BR)
  • other can be translated


  • Parameters screen


  1. Install the plugin in the Admin => Plugins menu => Add New => Upload => Select the zip file => Install Now
  2. Activate the plugin in the Admin => Plugins menu
  3. Run the importer in Tools > Import > Magento
  4. Configure the plugin settings. You can find the Magento database parameters in the Magento file app/etc/local.xml
    Hostname = host
    Port = 3306 (standard MySQL port)
    Database = dbname
    Username = username
    Password = password
    Table prefix = table_prefix


I get the message: „[fg-magento-to-woocommerce] Couldn’t connect to the Magento database. Please check your parameters. And be sure the WordPress server can access the Magento database. SQLSTATE[28000] [1045] Access denied for user ‚xxx’@’localhost‘ (using password: YES)“
  • First verify your login and password to your Magento database.
  • If Magento and WordPress are not installed on the same host, you can do this:
  • export the Magento database to a SQL file (with phpMyAdmin for example)
  • import this SQL file on the same database as WordPress
  • run the migration by using WordPress database credentials (host, user, password, database) instead of the Magento ones in the plugin settings.
The migration stops and I get the message: „Fatal error: Allowed memory size of XXXXXX bytes exhausted“ or I get the message: „Internal server error“
  • First, deactivate all the WordPress plugins except the ones used for the migration
  • You can run the migration again. It will continue where it stopped.
  • You can add: define('WP_MEMORY_LIMIT', '1G'); in your wp-config.php file to increase the memory allowed by WordPress
  • You can also increase the memory limit in php.ini if you have write access to this file (ie: memory_limit = 1G).
I get a blank screen and the import seems to be stopped
  • Same as above
The media are not imported
  • Check the URL field that you filled in the plugin settings. It must be your Magento home page URL and must start with http://
The media are not imported and I get the error message: „Warning: copy() [function.copy]: URL file-access is disabled in the server configuration“
  • The PHP directive „Allow URL fopen“ must be turned on in php.ini to copy the medias. If your remote host doesn’t allow this directive, you will have to do the migration on localhost.
I get the message: „Fatal error: Class ‚PDO‘ not found“
  • PDO and PDO_MySQL libraries are needed. You must enable them in php.ini on the WordPress host.
    Or on Ubuntu:
    sudo php5enmod pdo
    sudo service apache2 reload
I get this error: PHP Fatal error: Undefined class constant ‚MYSQL_ATTR_INIT_COMMAND‘
  • You have to enable PDO_MySQL in php.ini on the WordPress host. That means uncomment the line extension=pdo_mysql.so in php.ini
Does the migration process modify the Magento site it migrates from?
  • No, it only reads the Magento database.
Do I need to keep the plugin activated after the migration?
  • No, you can deactivate or even uninstall the plugin after the migration.
Is there a log file to show the information from the import?
  • Yes. First you must put these lines in wp-config.php:
    define(‚WP_DEBUG‘, true);
    define(‚WP_DEBUG_LOG‘, true);
    And the messages will be logged to wp-content/debug.log.

Don’t hesitate to let a comment on the forum or to report bugs if you found some.


August 1, 2019
I was trying to migrate from magento 1.9.x to 2.2.x and the magento official tool does not work as this plugin worked for migrating to woocomerce. I've got tons of errors and problems with magento, but with THIS plugin it works like magic! First i've tried the free version, it was already very cool. But the premium version is perfect!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Love it! It migrated the entire store, products(meta stuff migrated to yoast seo), reviews, menus, cms, orders, configurable products, stocks, all all perfect!!!!! Saved me days of work!!! Thank you!
Februar 24, 2019
Free plugin works great out of the box if you have simple Magento setup. Since we had a bit more complex setup, we have purchased a full plugin together with some additional extensions. Frédéric was very helpful and helped us a great deal. He even went up and above by extending his plugin in order to deal with our complex setup. In other words, money well spent on premium version. Great plugin and great support. Thank you Frédéric!
Februar 13, 2019
This plugin has saved me so much time. And they have a fantastic support team who will help if you get stuck...
Dezember 7, 2018
FredericGilles Development & support team will go above and beyond to help out. The plugin is solid and will definitely help in migrating your data. We used it to migrate from magento to wordpress. It went smoothly. Byron and his team helped us through out the process and responded back within 24 hours.
Lies alle 38 Rezensionen

Mitwirkende & Entwickler

„FG Magento to WooCommerce“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:




  • New: Translate the plugin in Brazilian (thanks to A. Costa)
  • New: Import the product tags


  • New: Add the hook „fgm2wc_pre_import_products“


  • New: Update the WooCommerce product meta lookup table
  • Tested with WordPress 5.2.2


  • New: Add an option to manage the stock or not. Used if the stock is not managed in Magento but the products must be in stock in WooCommerce


  • Tweak: Unset the default product category when emptying WordPress content
  • Tested with WordPress 5.2.1


  • Tested with WordPress 5.2


  • Fixed: Price = 0 for some product bundles


  • Tweak: Can manage the imported products in different languages (required for the WPML add-on)
  • Tested with WordPress 5.1.1


  • Fixed: Line breaks were removed in the product description
  • Tested with WordPress 5.1


  • New: Add the fgm2wc_get_other_fields hook


  • Fixed: Prevent negative stock values
  • Fixed: Notice: Undefined index: status


  • Fixed: Product sorting by popularity didn’t work


  • New: Check if we need the Product Bundles add-on
  • Tested with WordPress 5.0.3


  • Fixed: Products without title were not imported


  • Fixed: Some NGINX servers were blocking the images downloads
  • Tested with WordPress 5.0.2


  • Tested with WordPress 5.0


  • Fixed: Images not imported because of a missing starting slash


  • Fixed: Some category images were not imported


  • Fixed: Avoid importing products as duplicates


  • New: Generate the audio and video meta data (ID3 tag, featured image)
  • Fixed: Set the price = 0 for the bundle products
  • Fixed: Set manage_stock = no for the bundle products


  • Fixed: Some Magento 2 product stocks were not imported
  • Tweak: Cache some database results to increase import speed


  • Fixed: Don’t remove the WooCommerce pages associations when we delete only the imported data


  • Fixed: Wrong products pagination with out of stock products


  • Fixed: Regression from 2.55.1: products not imported on Magento < 2


  • Fixed: Products may be imported as duplicates


  • Tested with WordPress 4.9.8


  • Fixed: WordPress database error: [Cannot truncate a table referenced in a foreign key constraint (wp_wc_download_log, CONSTRAINT fk_wc_download_log_permission_id FOREIGN KEY (permission_id) REFERENCES `wp_woocommerce_downloadable_product_permission)]


  • Fixed: Empty the WooCommerce wc_download_log and woocommerce_downloadable_product_permissions tables upon database emptying
  • Change: Wording of the label „Remove only previously imported data“
  • Tested with WordPress 4.9.7


  • Tweak: Delete the wc_var_prices transient when emptying WordPress data
  • Tested with WordPress 4.9.5


  • Fixed: Fatal error: Uncaught Error: Cannot use object of type WP_Error as array


  • New: Allow the import of the Magento 2 brands (with the Brands add-on)
  • Fixed: Media path was wrong on some Magento 2 sites


  • Fixed: Notice: Undefined index: short_description


  • Fixed: Media not imported for some Magento 2 sites
  • Fixed: [ERROR] Error:SQLSTATE[42S02]: Base table or view not found: 1146 Table ’sales_flat_order‘ doesn’t exist


  • New: Import the media shortcodes like {{media url=“filename.jpg“}}
  • Tested with WordPress 4.9.4


  • Tweak: Use WP_IMPORTING


  • New: Check if we need the Custom Order Statuses add-on


  • New: Set the „Manage stock“ checkbox according to the Magento „manage stock“ value
  • New: Put the stock status as „in stock“ when the product stock is not managed
  • Tested with WordPress 4.9.1


  • Fixed: The variations were imported as simple products (Magento < 1.4)
  • Tested with WordPress 4.9


  • New: Make the products visibility compatible with WooCommerce 3


  • Fixed: Categories imported in wrong language


  • New: Check if we need the Product Options add-on
  • New: Sanitize the media file names


  • Tested with WordPress 4.8.2


  • Fixed: Categories with duplicated names were not imported


  • Fixed: Security cross-site scripting (XSS) vulnerability in the Ajax importer


  • New: Compatible with Magento 2.x
  • Fixed: CMS articles may be imported as duplicates
  • Improvement: Import speed optimization
  • Tested with WordPress 4.8.1


  • New: Allow HTML in term descriptions


  • New: Import the image caption in the media attachment page


  • New: Block the import if the URL field is empty and if the media are not skipped
  • New: Add error messages and information


  • New: Add the percentage in the progress bar
  • New: Display the progress and the log when returning to the import page
  • Change: Restyling the progress bar
  • Fixed: Typo – replace „complete“ by „completed“
  • Tested with WordPress 4.8


  • Tested with WordPress 4.7.5


  • Tweak: Code refactoring


  • Fixed: Duplicated image in the product gallery


  • New: Import the products visibility


  • Tweak: Clear WooCommerce transients when emptying WordPress content
  • Tested with WordPress 4.7.3


  • Fixed: Notice: Undefined index: name


  • Fixed: Term meta data not deleted when we delete the imported data only


  • Tweak: Add a hook after testing the database connection


  • Tested with WordPress 4.7.2


  • Change: Import the Manufacturer’s Suggested Retail Price as the regular price instead of the sale price


  • New: Add an option to import the Special Price or the Manufacturer’s Suggested Retail Price


  • New: Import the length, width and height as shipping attributes
  • Tweak: Code refactoring


  • Tested with WordPress 4.7


  • New: Import the default web site


  • Fixed: Existing images attached to imported products were removed when deleting the imported data


  • Fixed: The child products which are visible individually were not imported


  • Fixed: Wrong progress bar color


  • Fixed: The progress bar didn’t move during the first import
  • Fixed: The log window was empty during the first import


  • Fixed: The „IMPORT COMPLETE“ message was still displayed when the import was run again


  • Fixed: Database passwords containing „<“ were not accepted
  • Tweak: Code refactoring


  • Fixed: Wrong number of product categories displayed


  • Tweak: If the import is blocked, stop sending AJAX requests


  • New: Authorize the connections to Web sites that use invalid SSL certificates


  • New: Option to delete only the new imported data


  • Fixed: MySQL 5.7 incompatibility: [ERROR] Error:SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column ‚gv.position‘ which is not in SELECT list; this is incompatible with DISTINCT


  • Fixed: Some images were duplicated in the product gallery


  • Fixed: Review link broken


  • New: Display the needed add-ons during the database testing and before importing
  • Fixed: Wrong number of comments displayed
  • Tested with WordPress 4.6.1


  • New: Display the number of data found in the Magento database before importing


  • Tweak: Code optimization


  • Tested with WordPress 4.6


  • Fixed: WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‚xxx‘ yyy‘ LIMIT 1′ at line 4


  • Fixed: CMS pages from all languages were imported
  • Fixed: Notice: Undefined index: name
  • Tweak: Refactor some functions to allow multilingual import by the WPML addon


  • Fixed: PHP Notice: Object of class WP_Error could not be converted to int
  • Fixed: Notice: Undefined index: url_key


  • New: Import the product featured images


  • Fixed: Display an error message when the process hangs
  • Tweak: Increase the speed of counting the terms
  • Tested with WordPress 4.5.3


  • New: Run the import in AJAX
  • New: Add a progress bar
  • New: Add a logger frame to see the logs in real time
  • New: Ability to stop the import
  • New: Compatible with PHP 7
  • New: Compatible with WooCommerce 2.6.0


  • Fixed: The products without stock were not imported


  • Fixed: Products belonging to several bundles were imported as duplicates


  • Fixed: Some descriptions were not imported correctly
  • Tested with WordPress 4.5.2


  • Fixed: Compatibility issues with Magento 1.3
  • Tested with WordPress 4.5.1


  • Tested with WordPress 4.5


  • Fixed: Notice: Undefined index: short_description
  • Fixed: Column ‚post_excerpt‘ cannot be null


  • Fixed: Products not imported. Error: „WordPress database error Column ‚post_content‘ cannot be null“


  • Tested with WordPress 4.4.2


  • Tested with WordPress 4.4.1


  • Fixed: Fatal error: Call to undefined function add_term_meta()


  • Fixed: Better clean the taxonomies cache


  • Tweak: Optimize the termmeta table


  • Tweak: Use the WordPress 4.4 term metas


  • Tested with WordPress 4.4


  • New: Compatibility with Magento 1.3


  • New: Add a link to the FAQ in the connection error message


  • New: Add an Import link on the plugins list page
  • New: Change the translation domain name to be compliant with the WordPress translation system
  • Tweak: Code refactoring


  • Fixed: Refresh the display of the product categories
  • Fixed: Error: 1054 Unknown column ‚e.store_id‘ in ‚where clause‘


  • Fixed: Duplicate images
  • Fixed: Avoid a double slash in the media filename
  • Fixed: Import the original category name instead of the translation
  • Fixed: Notice: Undefined index: url_key


  • New: Compatible with Magento 1.4 to 1.9
  • New: Support the table prefix
  • Fixed: Don’t import the child products as single products


  • Tweak: Change the range of get_attribute_values()
  • Tweak: Make the argument $required_attributes optional
  • Premium version released


  • Tested with WordPress 4.3.1


  • Initial version: Import Magento product categories, products, images and CMS