2

I need to export a list of site users to a csv/xlsx file. I am creating an admin page with a download button which should run the export function.

I need to export the following data from wp_users:

  • ID
  • user_email
  • user_registered

I need to export the following data from wp_usermeta:

  • first_name
  • last_name
  • institution (this is a custom meta field)

How can I go about exporting this on the click of a button? I have the admin page and button setup but not sure on the correct query to get the data and put it into a csv

2
  • can you tell what you have tried so far?
    – fmeaddons
    Commented Jan 17, 2017 at 12:12
  • do you need both tables relationally merged?
    – funkysoul
    Commented Jan 17, 2017 at 19:28

0

Your Answer

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

Browse other questions tagged or ask your own question.