ExpertsGrow logo Get a free quote ↗

Export Users in WordPress: 4 Ways to Get a CSV File

November 18, 2026 · 11 min read
Export Users in WordPress: 4 Ways to Get a CSV File

You need to export users in WordPress for a mailing list, a migration, an audit or a spreadsheet report, and you open the Users screen to find an Export button. There isn’t one. This guide shows four easy ways to get a CSV of your users, explains what the built-in tool really does, and covers the privacy rules and safe file handling that most tutorials skip.

Export users in wordpress: Experts Grow guide cover

Quick answer: WordPress has no built-in CSV export for users. Tools > Export makes an XML file for moving content. To export users in WordPress as a CSV, use a vetted plugin, WP-CLI (wp user list --format=csv), or WooCommerce Analytics for customers. Export only the fields you need and delete the file afterward.

Back up first. Exports only read data, but you may be installing a plugin or running commands on a live site. Take a backup before you start.

What the built-in Tools > Export really does

Many people try Tools > Export first. It is not a user list tool.

According to the Tools Export screen documentation, clicking “Download Export File” creates an XML file in the WordPress eXtended RSS (WXR) format. The file can contain posts, pages, custom post types, comments, custom fields, categories, tags, custom taxonomies and users. The tool is meant for moving to a new host or keeping a backup, and the file is read by Tools > Import.

The limits matter if you want to export users in WordPress for a spreadsheet:

  • The output is XML, not CSV. Excel and Google Sheets do not open it as a clean table.
  • The filters cover posts and pages (category, author, date range, status). There is no filter for user role or sign-up date.
  • You cannot pick which user fields appear.

The Users screen does not fill the gap. The Users screen documentation lists search, role filter links and bulk actions, and the only bulk action it lists is Delete.

So a built-in way to export users in WordPress as CSV does not exist. You have four real options.

Compare the 4 ways to export users in WordPress

MethodBest forSkill neededOutput
1. PluginRegular exports, custom fields, filters by role or dateLowCSV, sometimes Excel
2. WP-CLIDevelopers, large sites, repeatable exportsMedium (command line)CSV, JSON, more
3. WooCommerce AnalyticsStore customersLowCSV
4. Built-in Export Personal DataOne person’s data, for a privacy requestLowZIP with HTML

Pick by your need when you export users in WordPress. A marketer with a few thousand users will usually choose a plugin. A developer with a very large database will usually choose WP-CLI.

Method 1: Export users in WordPress with a plugin

A plugin adds an export screen, usually under Users or Tools. You choose roles, a date range and fields, and download a CSV. The plugin directory has many options, and tutorials from plugin vendors cover most of them.

The risk is not the idea, it is the plugin you choose. A tool that can read every user record is a sensitive tool. As a real example, the original Export Users to CSV plugin page on WordPress.org now says it was closed on January 28, 2019 for a “Security Issue” and is not available for download. Several forks and similar plugins exist, so check each one yourself.

How to vet an export plugin

Before you install:

  1. Open its WordPress.org page and check Last updated and Tested up to. Skip anything that has not been updated in years.
  2. Read the support forum for security reports or unanswered complaints.
  3. Check it works with your PHP and WordPress versions on a staging copy first.
  4. Look at what it exports. A good plugin lets you untick fields such as password hashes and internal metadata.
  5. Remove it when you are finished. An unused plugin is a risk and a maintenance chore.

Typical steps to export users in WordPress

The names differ by plugin, but the flow is similar:

  1. Install and activate the plugin.
  2. Open its export page.
  3. Select roles (for example Subscriber or Customer) and a registration date range if you need one.
  4. Tick only the fields you need, such as email, first name and registration date.
  5. Click export and save the CSV.
  6. Deactivate and delete the plugin if you will not use it again.

If your plugin has a paid version, check whether you need it for custom fields before you buy.

Method 2: Export users in WordPress with WP-CLI

WP-CLI is the official command line tool for WordPress. You need SSH access to your server, and many hosts provide it. If you do not use SSH, skip to the next method.

According to the wp user list documentation, the command accepts --format=csv. The default fields are ID, user_login, display_name, user_email, user_registered and roles.

To save every user to a file:

wp user list --format=csv > users.csv

To export only one role and the fields you choose:

wp user list --role=subscriber --fields=ID,user_email,user_registered --format=csv > subscribers.csv

Notes from the documentation:

  • --role=<role> shows only users with a certain role.
  • --fields=<fields> limits the output to the fields you list.
  • --network lists users across a multisite network, but roles are not included with that flag.
  • --format accepts table (the default), csv, ids, json, count and yaml.

Custom user data, such as phone numbers stored by plugins, lives in user meta. WP-CLI has a wp user meta command for reading it, and you can pass meta fields to --fields when they exist for each user. Test on a few rows first. The commands list does not include a dedicated export command, so wp user list is the standard route.

Run the command from your WordPress root, or add --path=/path/to/wordpress. If you are unsure, ask your developer or host. Our WordPress developer service can set up a repeatable export if you need one.

Method 3: Export WooCommerce customers

WooCommerce customers are WordPress users with the Customer role, but they also have billing details and order history. A plain user export may miss some of that.

WooCommerce Analytics has report tables that can be downloaded. The WooCommerce Analytics documentation says to use the Download link in the upper right corner of a report table, and that large exports are emailed to the WordPress account that requested them with a link valid for one week. The Customers report documentation says to select Download to export the current customer view as a CSV file, and that larger reports are prepared in the background with a download link emailed to you. It also says the CSV always includes Billing phone, Shipping phone and Role, with Role as the last column. That is all we confirmed. We did not check which other fields it includes, such as full addresses or order history, so open a test download before you rely on it for a full customer list.

Things to know about store customers:

  • Guest buyers may not be WordPress users at all. They appear in orders, not in the Users list.
  • Billing and shipping fields often live in order data or user meta, so a user export plugin may need configuring to include them.
  • Marketing consent is separate from being a customer. A buyer is not automatically someone you may email.

If you run a store, user exports are also part of routine upkeep, which is what good WordPress support and maintenance is for.

Method 4: Export users in WordPress one at a time

This one is for privacy requests, not for lists. In Tools > Export Personal Data, you enter a username or email address, the person confirms by email, and WordPress prepares a ZIP file with an index.html file. The documentation says the download link is available for 48 hours and that the tool only gathers data from WordPress and participating plugins, so you may need to go beyond it to answer a full request.

It is the right tool when someone asks for their own data. It is the wrong tool for a mailing list.

Privacy and GDPR cautions

A user list is personal data. When you export users in WordPress, you make a copy of that data, with its own risks.

Article 5 of the GDPR sets principles that apply to a file like this. The text of Article 5 says personal data should be:

  • Limited to what is necessary for the purpose (data minimisation).
  • Kept no longer than necessary in a form that identifies people (storage limitation).
  • Processed securely, protected against unauthorised access or accidental loss (integrity and confidentiality).

In plain terms, export only the columns and people you need, keep the file only as long as you need it, and protect it while you do. If you are unsure whether you may use the data for a purpose such as email marketing, ask a qualified privacy adviser. This article is not legal advice.

Other cautions:

  • Passwords. WordPress stores password hashes, not plain passwords. You should not export them. Choose export fields that leave them out.
  • Consent. Being a user does not mean consent to marketing. Keep consent records separate.
  • Third parties. Do not upload a user export to a tool you have not vetted, and check where it stores data.
  • Children and sensitive data. Take extra care. If your site collects them, get advice before exporting.

Handle the CSV file safely

The CSV is where most leaks happen. Follow these steps.

  1. Save it somewhere private. Not a shared folder, public link or the WordPress uploads folder. If a plugin writes the file to your server, make sure it is removed after download. A file at a guessable web address can be found by anyone.
  2. Send it carefully. Avoid plain email attachments. Use a shared drive with access limits or an encrypted file.
  3. Limit who can open it. Share with named people only.
  4. Open it with care in spreadsheets. This is general security practice, not a WordPress rule. OWASP’s CSV injection page explains that spreadsheet programs can treat cells that start with characters such as =, +, - or @ as formulas, which someone could abuse by setting their own name or profile field. Import the CSV as text, and treat odd-looking cells with suspicion. OWASP also notes that simple filtering of the first character is not enough on its own.
  5. Delete it when finished. Remove it from your downloads folder, email and trash, and from any server where it was created. Keep a note of why you made it.
  6. Log the request. A line in a spreadsheet recording who exported what, when and why is enough for a small team.

Troubleshooting problems when you export users in WordPress

  • The plugin times out on a big site. Export by role or date range in smaller batches, or use WP-CLI, which does not rely on a web request.
  • Custom fields are missing. They are usually user meta. Check the plugin’s field settings, or use wp user meta.
  • Garbled characters. Open the file as UTF-8 text in your spreadsheet.
  • Multisite. To export users in WordPress networks, use the --network flag in WP-CLI or a plugin that supports multisite, and remember roles will not be included with that flag.
  • Too much data. Re-run with fewer fields. Less is safer.

Checklist to export users in WordPress

  • [ ] Reason for the export written down
  • [ ] Site backed up
  • [ ] Method chosen (plugin, WP-CLI, WooCommerce Analytics or Export Personal Data)
  • [ ] Plugin vetted for updates and security reports
  • [ ] Only needed users and fields selected, no password data
  • [ ] File saved in a private location, not on a public path
  • [ ] Shared only with named people through a secure method
  • [ ] Spreadsheet opened carefully, formulas not executed
  • [ ] File deleted when done, and any temporary plugin removed

Want us to help with exports and user data?

If you would rather not install a plugin or run commands yourself, we are happy to help. We can pull the export for you, set it up so it is repeatable, and check what else your plugins store about users. Our WordPress support and maintenance plans include ongoing care and backups, and you can send us your question through the contact page for a free look. You will get a plain answer even if you decide to do it yourself.

If you only need ongoing care, our WordPress care plans start at Essential $30 (PKR 8,400) per month, with Standard at $55 (PKR 15,400) and Pro at $100 (PKR 28,000).

FAQ

Can I export users in WordPress without a plugin?

Not as a CSV from the dashboard. Tools > Export makes an XML file for migration, and the Users screen has no export. Without a plugin, the usual route is WP-CLI with wp user list --format=csv, which needs command line access.

How do I export WordPress users to CSV with WP-CLI?

Run wp user list --format=csv > users.csv from your WordPress folder. Add --role= to pick a role and --fields= to choose columns, such as ID,user_email,user_registered.

Does a user export include passwords?

WordPress keeps password hashes, not plain text passwords. You should not export them. Pick fields explicitly and leave anything password-related out.

How do I export WooCommerce customers?

Open the Customers report in WooCommerce Analytics and select Download, which WooCommerce documents as exporting the current customer view as a CSV file. For fields beyond that, use a vetted export plugin that supports store data. Guest buyers may not exist as users, so check order data as well.

Exporting your own site’s users for a legitimate purpose, such as an audit or migration, is normal. But the data is personal data, so keep it to what you need, store it securely, delete it when done and get qualified advice for uses like marketing. This is not legal advice.

How do I export a single user’s data?

Use Tools > Export Personal Data. Enter the username or email, the person confirms by email, and WordPress prepares a ZIP file. The download link is available for 48 hours.