I'm getting error while Migrating data from to 2.2.6 CE.

Error I'm getting is like below:

Could not unserialize data of sales_flat_order_item.product_options with record id 7.

I've checked that field there is broken value like : b:0;

Rather than this other fields have complete serialize data.

Note : I've also more fields with universalize value.

Thanks If you help me with this.

  • Can you try dropping your target database and recreating it and restarting your migration? (The M2 database) Commented Dec 29, 2018 at 22:13
  • Have you get the answer? Commented Jan 27, 2020 at 9:24

1 Answer 1


I had the same error and after trying to fix the serialized string I ended up understanding that it was impossible. I tried everything from this great thread, but either the proposed solution wouldn't work either some information would get losted when fixing the string.

The simplest solution I found was to add a try and catch at the line 81 of this file: src/vendor/magento/data-migration-tool/src/Migration/Handler/SerializeToJson/SalesOrderItem.php

Just add a try and catch here:

$optionValue = $option['option_value'] ? unserialize($option['option_value']) :
  • That would prevent the issue from stopping the migration
  • The custom options wrongly generated in Magento 1 wouldn't be imported (but they were already wrong in magento 1)

More detailed information you can find it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.