Setup & site building · Guide
How to Export WordPress Users (Step by Step)

Short answer
WordPress has no built-in user export, so install a free plugin such as Import and export users and customers, open its Export tab, pick roles and fields, and download a CSV. Store owners can download customers from WooCommerce Analytics, and developers can run wp user list with the CSV format in WP-CLI.
Key takeaways
- Tools > Export does not export your user list.
- A free export plugin creates a CSV of users, roles and profile fields.
- WooCommerce Analytics can download customer lists directly.
- WP-CLI's wp user list command handles large sites without timeouts.
- Passwords are stored as hashes and cannot be exported as readable text.
How do you export WordPress users?
WordPress has no built-in user export button, so the easiest way is a free plugin such as Import and export users and customers, which saves all users and their profile fields to a CSV file.
Developers can export users with one WP-CLI command, and store owners can download customer lists from WooCommerce Analytics.
The right method depends on what you need the file for. A mailing list import, a site migration and a backup each need slightly different data.
Why doesn't WordPress export users by default?
The Tools > Export screen only exports content such as posts, pages and media, and it includes post authors only as names attached to that content, not as a full user list.
That export creates an XML file for moving content between sites. It does not include subscribers, customers, email addresses for non-authors, or custom profile fields.
WordPress also has Tools > Export Personal Data, but that is for privacy requests. It exports the data held about one person at a time, not your whole user list.
| Method | Best for | Skill level |
|---|---|---|
| Export plugin | CSV of all users with roles and meta | Beginner |
| WooCommerce Analytics | Customer lists for a store | Beginner |
| WP-CLI | Fast, repeatable exports | Intermediate |
| phpMyAdmin | Raw database copy of user tables | Advanced |
Method 1: How do you export users with a plugin?
Install a user export plugin, open its export screen, choose the roles and fields you want, and download the CSV file.
A widely used free option is Import and export users and customers, which handles both directions and includes user meta fields.
Typical steps:
- Go to Plugins > Add New Plugin and search for the export plugin.
- Install and activate it.
- Open its screen, usually under Tools or Users.
- Go to the Export tab.
- Pick the roles to include, such as Subscriber or Customer.
- Choose the delimiter and any date filters.
- Click Download and save the CSV file.
For more control over columns and filters, the WP All Export user add-on works with WP All Export and lets you build custom exports. Our guide on installing WP All Import covers the matching import side.
What data is included in a user export?
Most exports include the username, email, display name, first and last name, role, registration date and website, plus custom user meta fields if you select them.
User meta can include data from plugins such as WooCommerce billing addresses, membership levels or form fields. These can make the file much larger.
Choose only the columns you need. A newsletter import probably needs just email and name, while a migration needs everything.
Check the first few rows before you rely on the file. Missing columns usually mean a field was not selected, while blank values often mean users never filled that field in.
If you export regularly, save your column choices as a preset where the plugin allows it. That keeps every export in the same format, which makes imports into other tools predictable.
Our explainer on WordPress user roles explains what each role can do, which helps when you filter an export by role.
Can you export user passwords?
You cannot export readable passwords, because WordPress stores only a one-way hash of each password, but some tools can export the hash so users keep their login on another WordPress site.
This is a security feature. Even the site owner cannot see what a user's password is.
If you move users to another WordPress site with a plugin that keeps password hashes, users can log in as normal. If the new system is not WordPress, users will usually need to reset their passwords.
Never share files containing password hashes. Treat them as sensitive data.
Method 2: How do you export WooCommerce customers?
Go to WooCommerce > Customers or Analytics > Customers, set the date range, and click Download to get a CSV file of your customers.
For large stores, WooCommerce may prepare the file in the background and email you a download link instead of downloading it straight away.
The customer report includes names, emails, location, order counts and total spend. That makes it useful for marketing lists and sales analysis.
If you also need order details, see our guide on exporting WooCommerce orders to CSV.
Method 3: How do you export users with WP-CLI?
Connect to your server over SSH, move into the WordPress folder, and run wp user list with the CSV format option, sending the output to a file.
wp user list --fields=ID,user_login,user_email,display_name,roles,user_registered --format=csv > users.csv
You can filter by role too:
wp user list --role=subscriber --format=csv > subscribers.csv
The wp user list documentation lists every field and filter. If WP-CLI is not installed on your server, the WP-CLI website has installation steps, though many hosts include it already.
WP-CLI is ideal for large sites, where plugin exports can time out, and for scheduled exports run by cron.
Add the number of users to your checks. Running wp user list with the count format shows the total, so you can confirm the CSV has the same number of rows as the site.
Remember that the file is written into the current folder on the server. Download it over SFTP and then delete it, since a CSV of emails sitting in a public web folder could be found by others.
Method 4: How do you export the user tables in phpMyAdmin?
Open phpMyAdmin from your hosting panel, select your WordPress database, tick the users and usermeta tables, and export them as SQL or CSV.
The table names start with your site's prefix, usually wp_, so look for wp_users and wp_usermeta.
This gives a raw copy of the data. It is useful for backups and migrations, but the usermeta table stores data as rows of keys and values, which is awkward to read in a spreadsheet.
The phpMyAdmin import and export docs explain each export format. Our guide on adding a WordPress user in phpMyAdmin also shows how these tables fit together.
How do you open the CSV file correctly?
Open the file in a spreadsheet app using its import option and set the encoding to UTF-8, so names with accents or non-Latin characters display properly.
Double-clicking a CSV in some spreadsheet apps can garble special characters or merge columns. Using the import option lets you choose the delimiter and encoding.
Also watch for leading zeros in phone numbers and long ID numbers. Format those columns as text before importing.
How do you keep exported user data safe?
Store the file somewhere private, share it only with people who need it, delete it when the job is done, and make sure you have a lawful reason to use the data.
User exports often contain personal data such as names, emails and addresses. Many privacy laws, including GDPR, set rules for how you handle it.
This is general information, not legal advice. Check your privacy policy covers the reason you are exporting, such as moving to a new email platform.
Good habits:
- Export only the fields you need.
- Do not email files with personal data unencrypted.
- Remove the file from your downloads folder after use.
- Do not import users into a mailing list unless they agreed to receive emails.
What if the export fails or times out?
Large exports can hit PHP memory or time limits, so export in smaller batches by role or date range, increase the limits, or switch to WP-CLI.
Common fixes:
- Filter by role or registration date to make smaller files.
- Ask your host to raise max_execution_time and memory_limit.
- Turn off plugins that hook into user queries during the export.
- Use WP-CLI, which runs without the browser's time limits.
Our guide on fixing WordPress export errors covers memory and timeout problems in more detail.
How do you import users on the new site?
Use the import side of the same plugin, upload the CSV, map the columns to WordPress fields, choose how to handle existing users, and decide whether to send welcome emails.
Test with a small file first, such as ten users. Check their roles, meta and login before importing the full list.
Turn off welcome emails unless you want every user to get a notification. A sudden email to thousands of people can confuse them and hurt your sender reputation.
After importing, review roles carefully. Our guide on changing user roles in WordPress shows how to fix anyone given the wrong access.
Frequently asked questions
Can I export WordPress users without a plugin?
Yes. You can run wp user list with the CSV format in WP-CLI, or export the users and usermeta tables from phpMyAdmin. WooCommerce store owners can also download customer lists from the Analytics area. The built-in Tools export does not include a user list.
How do I export WordPress users with their roles?
Most export plugins include a role column and let you filter by role before downloading. In WP-CLI, add roles to the fields list, or use the role filter to export one role at a time, such as subscribers or customers.
Will exported users keep their passwords on a new site?
Only if the export and import tools carry over the password hash and the new site runs WordPress. Readable passwords cannot be exported. If the new platform is not WordPress, users usually need to reset their passwords after the move.
How do I export only subscribers from WordPress?
Choose the Subscriber role in your export plugin's role filter before downloading. With WP-CLI, run wp user list with the subscriber role filter and CSV format, then save the output to a file.
Is it legal to export my WordPress users?
Exporting data you hold is usually fine for legitimate purposes, but privacy laws such as GDPR control how you use and share it. This is general information, not legal advice. Make sure your privacy policy covers the purpose and keep the file secure.
Sources
- wp user list WordPress Developer Resources
- Import and export users and customers WordPress.org Plugins
- WP All Export – User Export Add-On WordPress.org Plugins
- Import and export phpMyAdmin Documentation
- WP-CLI WP-CLI
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


