Title: Import integer as integer
Last modified: September 15, 2020

---

# Import integer as integer

 *  Resolved [phrk](https://wordpress.org/support/users/phrk/)
 * (@phrk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/import-integer-as-integer/)
 * Hello, am I missing something obvious? When importing meta key with integer value,
   it is imported as a string, e. g. 1234 as [“1234″] or ‘a:1:{i:0;s:4:”5919”;}’(
   as shown in phpmyadmin). Is there any easy way to import integer numbers as numbers?
   Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13409569)
 * [@phrk](https://wordpress.org/support/users/phrk/),
 * This is always managed as a string because in CSV we read strings.
 * Anyway, update_user_meta, for example, does not manage the data as integer, so
   where have you seen some WP managing some meta data as integer?
 *  Thread Starter [phrk](https://wordpress.org/support/users/phrk/)
 * (@phrk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13410064)
 * Sorry, I wrote a nonsense 🙂
    Value “1234” from the CSV is imported as an array–[“
   1234″] in the meta field or ‘a:1:{i:0;s:4:”1234”;} in the database. The target
   fields are of type “text”. Fields of type “boolean” are correctly imported (value“
   1” as true).
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412123)
 * Could you show me how are you importing this value in your CSV?
 *  Thread Starter [phrk](https://wordpress.org/support/users/phrk/)
 * (@phrk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412258)
 * Sure! I tried this:
    “ID” 1234
 * and
 * “ID”
    “1234”
 * with the same result – meta text field “ID” in user profile containing [“1234”].
 * Thanks!
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412297)
 * Yes, sure, but this is how WordPress save the data into meta.
 * Meta can be array or object, so it always save it in this way.
 * Which is the problem :s?
 *  Thread Starter [phrk](https://wordpress.org/support/users/phrk/)
 * (@phrk)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412362)
 * So – if I understand it correct – there is no straightforward way how to save
   the number as a pure string to the meta field using your plugin. I will solve
   it other way. Thank you for great support, marking as solved.
 *  Plugin Author [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * (@carazo)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412779)
 * [@phrk](https://wordpress.org/support/users/phrk/),
 * No this is not a problem of this plugin, this is a problem of how WordPress works:
   [https://developer.wordpress.org/reference/functions/update_user_meta/](https://developer.wordpress.org/reference/functions/update_user_meta/)
   check this function.
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Import integer as integer’ is closed to new replies.

 * ![](https://ps.w.org/import-users-from-csv-with-meta/assets/icon-256x256.png?
   rev=1174343)
 * [Import and export users and customers](https://wordpress.org/plugins/import-users-from-csv-with-meta/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-users-from-csv-with-meta/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/)
 * [Active Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-users-from-csv-with-meta/reviews/)

## Tags

 * [Import](https://wordpress.org/support/topic-tag/import/)
 * [meta key](https://wordpress.org/support/topic-tag/meta-key/)

 * 7 replies
 * 2 participants
 * Last reply from: [Javier Carazo](https://wordpress.org/support/users/carazo/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/import-integer-as-integer/#post-13412779)
 * Status: resolved