I am attempting to migrate the data located on the /admin/commerce/orders page of Drupal Commerce to a custom website that I have created. I am trying to use phpMyAdmin to locate and export any relevant database information in the Drupal database. I have found that the order id/email/timestamp are located in the commerce_order table in the Drupal database. However, I can't find the location (table/table column) of the user's name and shipping information.

Does anyone have an idea of where I could find this information?

I am currently using Drupal 7.53 and Drupal Commerce 7.x-1.13.

  • Depending on your needs and how familiar you are with Drupal, it might be faster to make a view that shows all the info you need and then use Views Data Export to get a CSV file. Nov 27, 2017 at 10:27

1 Answer 1


Drupal's entity data isn't really meant to be exported directly from the database. Is there no way for you to build a PHP script that uses the Drupal API to load and export these entities instead? Or an existing module like Patrick suggests?

Otherwise, you're going to need to pull information from a variety of tables. Shipping information is stored on an order's shipping customer profile. These are linked to the order via a customer profile reference field (whose table should be field_data_commerce_customer_shipping). From there you can find the customer profile ID you'll need to search for in the address field data, matching the profile ID against the entity_id in the field_data_commerce_customer_address table.

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.