Are you looking to import WordPress users along with their custom fields?
Custom fields are a powerful feature in WordPress that allows you to store additional information about your users. This could range from simple data like phone numbers to more complex information like user preferences or custom roles.
However, importing users with custom field values can be quite challenging. It’s not just about transferring basic user details like names and emails; you need to ensure that all the custom meta-data is accurately imported as well. Many plugins fall short when it comes to handling custom fields, often leading to incomplete or incorrect data.
In this article, we'll show you how to use the WP All Import plugin to accurately import users along with their custom field values.
Let's get started!
What Are WordPress Custom User Fields?
By default, the WordPress user profile includes basic information about a user such as their name, email address, website, user role, biographical information, and more. These fields cover the basic details needed for a standard user profile.
However, depending on the type of website you run, you might need to include additional information about your users. This is where custom user fields come into play. Custom user fields are extra information fields that can be added to the standard user profile to store more specific data.
For example, if you run a business website, you might want to capture additional details like phone numbers, job titles, and the companies where your users are employed. Similarly, an educational website might require fields for student IDs, courses enrolled, and graduation dates.
Custom profile fields allow you to tailor user profiles to better fit the unique needs of your website. You also get deeper insights which allows you to better interact and manage your users.
How To Import WordPress Users With Custom Fields
To make the whole import process easier, we'll be using the WP All Import plugin. It is an excellent WordPress user import plugin that includes a special add-on for importing users with custom fields.
It comes with a user-friendly interface and an import wizard that makes the whole import process easier, even for beginners. Here are some of the key features that make it a topic choice among website owners:
- Easily map fields from your CSV file to the appropriate WordPress fields using a simple drag-and-drop interface.
- Seamlessly import users along with their custom fields, including those added via the ACF plugin.
- Automate the import process by scheduling imports to run periodically.
- Powerful filtering to ensure you only import the necessary users.
Before we start the user import process, it's important to have the custom user profile fields added to your website. Let's first look at how to add them to your website.
1. Add Custom User Profile Fields Using Advanced Custom Fields
The best way to add extra user profile fields in WordPress is to use the Advanced Custom Fields (ACF) plugin, which is available for free. After installing the plugin, navigate to ACF › Field Groups from your WordPress dashboard and click the + Add Field Group button.
On the new page, enter the name of the field group and start adding individual user fields. The first field will be added automatically; you just need to choose the field type and enter the details.
As an example, we'll be adding three fields: Phone Number, Job Title, and Organization Name.
To add the phone number field, select the field type as Number and enter the label as 'Phone Number.'
If you want to make this a required field, switch to the Validation tab and toggle the Required button.
Similarly, click the Add Field button and add the rest of the fields such as Job Title and Organization Name. You can select the field types as Text for these fields.
After you've added all of the custom user fields, it's time to bulk-import the user data from an external CSV file. Let's explore that in detail.
2. Install and Activate the WP All Import Plugin
Before starting the import process, you'll need to install and activate both the WP All Import Pro plugin and its Users and ACF add-on. If you do not already have the plugin, you can get it here.
Once you have the zip files for both the plugin and the add-ons, follow these steps to install them:
- Go to WordPress admin dashboard › Plugins › Add New.
- Upload the WP All Import zip file on the website and click the Install button.
- Once the installation completes, click on the Activate button.
Repeat the same process to install the Users and ACF add-on on your website. Once everything is properly set up, let's look at the import process in detail.
3. Create a New WordPress User Import
To start the import process, navigate to All Import › New Import from your WordPress dashboard. WP All Import gives you three ways to add user data:
- Upload the file from your local disk.
- Download the file from a URL.
- Select an existing file on your server.
For this tutorial, we'll choose to upload a file. To do so, click the Upload a file option and select the CSV file from your computer.
Once the file is uploaded, choose New Items and select the import type as Users.
After you've made all the selections, click Continue to Step 2.
4. Review WordPress User Data and Custom Fields in Your Import File
The next step in the process is the Review Import File step. This step gives you a preview of the user records in your import file.
It shows the total user count at the top, and you can easily navigate between individual records using the gray arrows on both sides.
This step is important to confirm that all records are correct before proceeding with the import. If you spot any major problems with the data, you can cancel the import, edit the file, and start the process again. If there are only minor formatting or layout issues, you can ignore those as WP All Import is powerful enough to modify incoming data during the import process.
On the same page, WP All Import also includes a filtering option that allows you to filter the incoming data so that only selected users are imported.
Once you've added all three components, click the Add Rule button. The filter won't apply as the import data is not stored in the WordPress database. To apply the filter, click the Apply Filters to XPath button. This will also update the total user count displayed at the top.
WP All Import's filtering feature is so powerful that it allows you to apply multiple rules using the AND and OR conditions. This enables you to go even deeper in selecting the exact users you want to import.
After applying the filters, click the Continue to Step 3 button to move to the next step.
5. Map User and Custom Fields Data to WordPress User Fields
This is the most important step in the entire import process. WP All Import allows you to use the drag and drop interface to map user fields from your import file to the WordPress user fields.
The user fields are divided into different sections such as User Account Info, Other User Info, Custom Fields, and Advanced Custom Fields Add-On. You can start with the User Account Info fields and then move down to the other panels.
The custom user fields we added via ACF will be shown under the Advanced Custom Fields Add-On panel. Expand the panel and drag and drop the fields from the table on the right to the box on the left.
WP All Import also comes with advanced features that let you modify the incoming user data during the process. These features include combining multiple fields or modifying the data using custom PHP functions.
After you've mapped all the fields, click the Continue to Step 4 button to proceed.
6. Configure Additional User Import Settings
The Import Settings page consists of multiple settings to efficiently import the user data. Most of these settings can be applied with simple clicks.
The first setting on the page is the Unique Identifier, which allows WP All Import to differentiate between user records. This is important to avoid importing duplicate users into your website.
You can click the Auto-detect button to let WP All Import select the best identifier from your file. You can also manually set it using the same drag-and-drop interface, but the auto-detect option works well most of the time.
The next option is to choose whether or not to send a welcome email to imported users. If you're importing users from a CSV file created from scratch, unchecking the option will allow you to send an email containing a password reset link.
If the import file is an export from another website, you can check the option to block WordPress from sending the email and let users use their existing password on the new website.
If you scroll further down, the next is the Scheduling Option. This option lets you automatically import user data on a fixed schedule. It works only when you select to import data from a URL or use an existing file from your server.
As we imported data by uploading a local file, this option won't apply for this import. When set up, this is how it looks.
The last panel on the page is the Configure Advanced Settings panel. This includes some speed optimization options and a few other settings. These options are self-explanatory and can be enabled by clicking the relevant checkboxes.
After you've configured all the settings, click the Continue button to move to the last step.
7. Run the Import and Verify the Imported User Data
The Confirm & Run is the last step in the import process. Before running the import, it gives you a summary of all the steps we've completed so far. This allows you to check for any mistakes in the process before proceeding.
If you spot any mistake, you can go back to that specific step and correct it. If there are no mistakes, click the green Confirm & Run button to begin the import.
Depending on the number of users in the import file, WP All Import will take a few minutes to complete the process. Once done, it will show a confirmation indicating how many users were imported and whether any existing users were updated.
To verify the import, navigate to Users › All Users and check for the newly imported users. To check the custom field data, click the individual username to open the user profile page. Scroll down on the same page to see the custom field values for each specific user.
That's it! Ready to effortlessly import user data including custom field data to WordPress? Download and install the WP All Import plugin today.
Import WordPress Users With Custom Fields - Frequently Asked Questions
How Do I Import Custom Fields Into WordPress?
You can use WP All Import to easily import custom fields into WordPress. It includes a dedicated add-on to the most popular custom field plugins like Advanced Custom Field, Meta Box, and JetEngine.
How Do I Export Users With Custom Fields in WordPress?
WP All Export is the best WordPress export plugin that includes support for all types of custom fields. These include fields added by custom field plugins like Advanced Custom Field, Meta Box, and JetEngine as well as third-party plugins like WooCommerce, membership, LMS, and others.
How Do I Import Users From One WordPress Site to Another?
To efficiently migrate users from one WordPress site to another, use a combination of the WP All Export and WP All Import plugins.
- Use the WP All Export plugin to export users from your source site.
- Import the exported file to your destination site using the WP All Import plugin.