0

I have to update the information of 1500 members of my clients Wordpress site. I'm using a membership to manage paidd subscriptions and I have to update the custom fields generated by this Plugin.

I have looked in the MySQL database and found the following meta keys in the wp_usermeta table:

paypal_user, paypal_status, paypal_custom_fields

Pyapal_user and paypal_custom_fields have a several bits of information in each one that need updating.

I know how to import to MySQL using a CSV, but I'm not too sure how to set the data out in the CSV file as I'm not to familiar with MySQL.

Would anyone know?

Thanks in advance.

2 Answers 2

1

As far as I know there is nothing native in WP to parse CSV files and stuffing this into database directly doesn't seem like a good idea either.

  1. You can parse your CSV with PHP, see fgetcsv() for starters.

  2. Then use update_user_meta() to create those values.

1

You should write a custom importer and register the custom fields before the import if WP doesn’t know them.

I’ve written an importer for a CSV table with user data and custom user meta fields some time ago. It is quite old and all messages are in German – but it is still working. If you need just an example, I could put it online despite its embarrassing quality.

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.