1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.