Skip to content

How to export and import users in Wordpress

Héctor de Prada
Cómo exportar e importar usuarios en Wordpress Modular

In the current digital world, one of the major advantages offered by WordPress is the ability to export and import users. This functionality is vital when moving your WordPress site from one web hosting to another, or when you need to share your user database with other WordPress sites or marketing tools.

Users in WordPress

A user in WordPress is a registered account on your site. Users can be administrators, editors, authors, contributors, or subscribers, depending on the level of access assigned to them. When exporting WordPress users, you get a file that contains relevant data of these users.

Why you might want to export WordPress users

There are several reasons for wanting to export WordPress users. You may want to change your hosting, share your user list with another WordPress site, or simply back up your user database. User export is also useful if you need to create a contact list for your email marketing campaigns.

Export Import Users in WordPress with Plugin

One of the most popular and reliable plugins for exporting and importing users is the Import Export WordPress Users Plugin. This plugin allows you to export all relevant user data, such as usernames, emails, user roles, and more, to a CSV file. Additionally, it gives you the ability to import users from a previously generated CSV file.

Export Import Users in WordPress Without Plugin

Exporting without plugins

To export users without using a plugin, you will have to access your WordPress site’s database. Most web hosting providers offer access to phpMyAdmin, a web-based database administration tool.
Once you are in phpMyAdmin, select your WordPress database from the left panel. Then, locate the table called ‘wp_users’ (or something similar, depending on your configuration). This table contains the information of all your users.

To export the user table, select ‘wp_users’, then click on the ‘Export’ tab in the top menu. Choose the ‘CSV’ format for the output file and click the ‘Go’ button. This process will generate a CSV file with all your users, which you can open with any program that handles this format, such as Microsoft Excel or Google Sheets.

Importing Without Plugins

Importing users manually can be a bit more complicated because you need to ensure that the data in the CSV file matches exactly the structure of the WordPress user table.
To start, open phpMyAdmin and select your WordPress database. Make sure you have a backup of your database before proceeding, as any errors can cause serious problems.

Then, click on the ‘Import’ tab in the top menu. On the import page, select your CSV file and make sure the import format is set to CSV. Once everything is correctly set up, click the ‘Go’ button to initiate the import process.

If everything is done correctly, the users from the CSV file will be added to your WordPress database. Please note that this method requires some technical expertise, and any mistakes can have severe consequences. If you are not comfortable working directly with the database, we recommend using plugins like the one mentioned above.

How to export users or customers from WordPress or WooCommerce to a file

If you are using WooCommerce on your WordPress site, you may need to export your customers as well. The good news is that the Import Export WordPress Users Plugin also supports exporting WooCommerce customers.

Export specific users to a CSV file

There are occasions when you only need to export a specific group of users. The Import Export WordPress Users Plugin also allows you to do this. Simply select the user role you want to export, and the plugin will generate a CSV file with the users that meet this criteria.

Conclusions

The ability to export and import users in WordPress is a valuable feature that can save you a lot of time and effort. Whether you need to move your site to a new web hosting, share your user list with another site, or simply back up your user database, user export allows you to do all of this efficiently.
Now that you know how to export and import users, if you want to learn more about WordPress, you should check out our article on the best WordPress podcasts of the moment.

Autor
Héctor de Prada
Cofounder & CEO at ModularDS
Almost 10 years working with WordPress in more than 100 different projects. Since 2022 he attends and enjoys as many WordCamps as he can. Always open to talk with other web professionals.

Subscribe to our Newsletter about the web world