Being able to add and manage users is a great feature of WordPress. But sometimes you’ll need to export WordPress users so you can make use of your user data for another purpose or migrate users to another site.
But how do you do it? In this article, we’ll show you how:
- Why You Might Want to Export WordPress Users
- Data Protection Considerations
- How to Export and Import Users in WordPress (3 Plugins)
- Exporting and Importing Users with the Import Export WordPress Users Plugin
- Exporting and Importing WooCommerce Customers
- How to Export and Import Users in WordPress Multisite
- Exporting and Importing WordPress Subscribers
- Bulk Exporting Users
Why You Might Want to Export WordPress Users
Some of the situations you might need to export users in WordPress are:
- You need offline access to user data so you can make contact with subscribers or customers.
- You’ve created a new site and need to migrate users from your old site.
- You’re creating a second WordPress site and want to duplicate the users from your first site.
- You’re migrating a site out of a Multisite network and into a standalone site (or vice versa) and can’t export users along with other data as they’re stored separately by Multisite.
Data Protection Considerations
Before you export your WordPress users, check that you’ve been given permission to use their data in this way.
For people in your organization involved in managing the site, this won’t be an issue. But if you’re exporting customer or subscriber data, then you may only have permission to use their data on your existing site.
Before you proceed, check what permission you were given when you first collected the data and the laws for your territory. You may need to seek legal advice (this article doesn’t constitute legal advice).
How to Export and Import Users in WordPress (2 Plugins)
The easiest and most reliable way to import and export WordPress users is by using a plugin. These will let you export users from one WordPress site to a file you download to your computer, then upload that file to import users to the new site.
Let’s take a look at some of the plugins that will do this for you.
Import Export WordPress Users
The Import Export WordPress Users plugin lets you export all users or to just export users with one or more roles that you select. It also lets you specify what data to export, so if you don’t need every field, you can remove those from your export.
It generates a CSV file that you then upload to another site to import your users. It handles all user roles including WooCommerce customers and user roles added by other plugins. However it doesn’t export physical addresses, so if you’re exporting WooCommerce customers and want to maintain address records for future orders, you’ll need the WooCommerce Export Customer List CSV plugin detailed above.
Find out how to use the plugin to export and import WordPress users below.
WP All Export
The WP All Export plugin lets you export all kinds of data from WordPress, not just users. Combined with its sister plugin, WP All Import, you can use it to export and import WordPress users.
It has a range of customization options meaning you can use it to export and import users and other data. It only allows user export in the premium version, so if you need this degree of flexibility, you’ll have to pay for it.
Exporting and Importing Users with the Import Export WordPress Users Plugin
Let’s have a look more closely to this pretty handy export plugin for WordPress: the Import Export WordPress Users plugin. This plugin will let you both export and import users and here’s how to use it.
Exporting Users with the Import Export WordPress Users Plugin
To export users with the Import Export WordPress Users plugin, first activate the plugin. Then go to Users > User Import Export. This will bring up the User/Customer Export screen. From there:
- Click on the User Roles field and select the roles you want to export. You can select as many as you want.
- Use the Offset field if you need to skip a number of records before exporting. This is useful if you’re exporting your data in batches, something that’s worth doing if you have thousands of users. You can also use the Limit field to limit the number of records you export.
- Scroll down and deselect any fields you don’t want to export, or leave them all checked if you want to export everything.
- Click the Export Users button and the plugin will create a CSV file for you to download:
Importing Users with the Import Export WordPress Users Plugin
To import users, go to Users > User Import Export and select the User/Customer Import tab. From there:
- Click the Choose File button to select your CSV file.
- Click the Upload file and import button to upload the data.
The plugin will import the user data from the CSV file, creating new users on your site:
Exporting and Importing WooCommerce Customers
Most of the plugins for importing and exporting users will export WooCommerce customers, but they won’t export all of the extra user fields that WooCommerce creates, such as physical addresses.
To export full user details including physical addresses, use the WooCommerce Export Customer List CSV plugin.
This lets you specify which fields you want to export and how many rows of customer data to include. You then run an export, sending the data to a CSV file.
The plugin is designed for store owners who want offline access to their customer list rather than people who want to migrate data to another site, as it doesn’t include an import function.
How to Export and Import Users in WordPress Multisite
When exporting users from a WordPress Multisite installation, you need to consider whether it’s all the users on the network you need to export or just those from one site.
The Import Export WordPress Users plugin lets you export users from one of the sites in your network and then import it to a site in another network or into a standalone site. More on this plugin shortly.
Exporting and Importing WordPress Subscribers
The plugins for exporting user data will all export subscribers to your site. But what if you used a plugin to create newsletter subscribers, or added WordPress.com subscribers using the Jetpack plugin?
The Import Export WordPress Users plugin will export all user roles, so if your user data is stored on your site, that data will be exported. If you used a plugin such as a mailing list plugin to gather subscribers and send their data to a service outside your WordPress site, you’ll have to export users from there, not from your WordPress site. If you’ve gained followers on WordPress.com via Jetpack, you can export them using Jetpack’s subscriptions module.
Bulk Exporting Users
All of the plugins for exporting user data will let you bulk export users in WordPress. The Import Export WordPress Users plugin lets you specify the number of records to export so you could use it to export anything from one user to all of them.
Exporting WordPress user data is something you’ll need to do if you want to access the user data offline or import it to another site.
Suggested reading: How to Export a WordPress Site
The Import Export WordPress Users plugin will let you export your users so you can work with their data offline or import them to another site. And if you’re running a WooCommerce site, you can use the WooCommerce Export Customer List CSV plugin to export all of your customer data including physical addresses.