| 开发者 |
carazo
hornero |
|---|---|
| 更新时间 | 2026年11月23日 19:43 |
| 捐献地址: | 去捐款 |
| PHP版本: | 5.5 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[import-users] shortcode[export-users] shortcode"The final import of all 900+ users was quick and precise. Everything smooth like oil." — Paolo Beccari "I imported 31,000 users successfully, thanks to this plugin." — tbhpshop "I needed to import users, send them login details, and add them to specific Paid Memberships Pro membership levels, all of which it did flawlessly." — David Robinson "It even managed to import the custom roles that I created using the Members plugin." — Arischvaran Puvanesvaran "I've used this for years, importing classlists and updating classlists each term with my courses." — wpnovice2 "The next morning, I had my fix in a new version. Amazing, personalized support." — pierre1wpRead all the reviews ⭐ Premium add-ons
CSV files, in UTF-8 or in the Windows-1252 encoding used by Excel, with any delimiter (comma, semicolon, tab...). The encoding and the delimiter are detected automatically. To import XLSX, XLS or ODS spreadsheets or XML files directly, use the File Formats add-on.
The export creates a CSV file that Excel, LibreOffice and Google Sheets open directly. With the File Formats add-on you can also choose Excel (XLSX), OpenDocument (ODS) or XML in the "File format" option of the export, in the shortcode ([export-users format="xlsx"]) and in the recurring exports.
No. In the second step of the assistant you match each column with a WordPress field, a WooCommerce field or a custom field, and most columns are recognised automatically. Columns you do not need can be ignored. If you use the classic screen, the first two columns must be the username and the email.
Yes. Use columns for the billing and shipping fields (billing_first_name, billing_phone, shipping_address_1...) or match your own columns with them in the assistant. You can download a WooCommerce template with example data from the first step.
Yes, since version 3.1. Check "WooCommerce guest customers" in the Export tab: you get one row per billing email with the details of the last order. Emails that already belong to a registered user are skipped. If you import that file, an account is created for each guest with the email as username.
Yes. Export the users with "Export password hashes" checked, and import the file in the new site matching the user_pass column as "Password hash (from another WordPress)". Users keep the password they already had.
Users are matched by ID, username or email. In the third step you choose whether to update them or skip them. Their passwords, roles and emails only change if you allow it in More options.
If the file has no password column, new users get a random password, which they can receive in the welcome email or change with "Lost your password?". If a cell has a value, that will be the password. Existing users only get a new password if you allow it in More options.
Yes, since version 3.1. In the second step, use "Transform the value" under any column to replace a text, add a text before or after, change upper or lower case or set a value for empty cells. You can also add a field with the same value for every user. The preview shows the result before importing.
Yes. The email can be customized in Settings > Mail options, with wildcards for the username, the password, the login URL and any field, and you can send a test email. You can also turn off the automatic emails of WordPress.
The import runs in batches, so files with tens of thousands of users can be imported without timeouts. Some users have imported more than 30,000 users at once.
Yes. In the first step choose "Use a URL or a file on this server" and paste the link to the CSV, the link of a Google Sheet or a path inside your uploads folder.
Yes. The Recurring tab imports a file or a URL periodically (hourly, daily, weekly...), so you can keep your users in sync with an external system. The free version has one recurring task, and its file must have the classic format (username in the first column and email in the second one). The Recurring Import add-on adds unlimited tasks, each with its own file, interval, role and notification email, and lets you map the columns of each file like in the import assistant, so it can keep its own column names and order.
The import runs as the user selected in "User that runs the cron", so it can only do what that user is allowed to do. If the settings are saved by a user who cannot edit other users (edit_users), the import always runs as that same user.
Yes, with the Recurring Export add-on.
Yes, with the LearnDash add-on. It exports and imports their groups, enrolled courses, lessons and topics completed, quiz attempts and completed courses with their original dates, using course and lesson titles instead of IDs, so the file also works on a new site and can be filled by hand. Old progress is imported without emailing your students.
Yes, with the BuddyPress & BuddyBoss add-on. It creates one package with the users (and their passwords), profiles, photos and cover images, profile and group types, groups, memberships with their roles and dates, connections, followers and forum subscriptions, and imports it on the new site, even from BuddyPress to BuddyBoss. Nothing is posted to the activity stream and no emails are sent to your members.
Yes, with the Sync add-on. Instead of exporting and importing files, every new user and every change of email, password, role, name, WooCommerce address or the user meta you choose reaches your other sites in seconds, in both directions. Conflicts are solved field by field, you decide what each site does when a user is deleted, and the users you already have are matched by email with the initial sync.
The free version adds the users to the sites of the blogs column, and every column is saved for the whole network. With the Multisite add-on you decide column by column if the data belongs to one site or to the whole network, so the same template works on every site, you give each user a different role on each site (2:editor,3:author), remove users from sites and export every user of the network with their sites, roles and the data of each site in one file.
Yes. The plugin adds WP-CLI commands: wp acui import users.csv imports a file (or a URL) with the same engine as the import screen, --auto-map matches the columns of the file like the import assistant and --dry-run shows what would happen without saving anything. wp acui export --file=users.csv exports the users, with filters by role, users and registration date and the columns you choose. wp acui columns lists the columns you can use, wp acui history shows the latest imports and exports, and wp acui cron run runs the recurring import from the crontab of your server. Run wp help acui to see every option.
Yes, with the Ultimate Member add-on. Ultimate Member saves photos, files and many fields in its own way, so a plain import leaves profiles half empty. The add-on imports every field of your forms converted to its type (dropdowns, checkboxes, multi selects, dates, times and ratings), profile and cover photos from a URL or the media library with the thumbnails of Ultimate Member, image and file fields, the account status with or without emails, privacy and members directory visibility. It also exports them with the same columns, ready to import on another site.
Yes, in More options of the third step. You can also change their role instead. The preview tells you how many users will be deleted, and nothing is deleted if the import has errors.
WordPress requires an email for every user. The Allow No Email add-on removes that requirement.
Yes. Import any custom field matching the column with "Custom field" in the assistant, or using the field name as the column header. ACF, BuddyPress, Paid Memberships Pro, WooCommerce Memberships, WooCommerce Subscriptions and the other plugins listed above have their own integrations.
Yes, with a column matched as "WordPress user ID". If the ID exists and the username is the same, the user is updated. WordPress does not allow creating users with an ID of your choice, so IDs that do not exist give an error. Use it only if the file comes from the same site.
Yes. Serialized values are imported as they are. To import a list as an array, separate the items with two colons (::) inside the cell.
In the Log tab. History shows the last 100 imports and exports with the user, the file, the result and the errors, Backend shows the detail of the last manual import, and Recurring shows the last recurring import.
This is caused by the option that forces the users to reset their password. When it is used, each of those users is redirected to their password page on every page load until they change it, and if that destination cannot be reached (for example, because wp-admin is blocked for customers or subscribers by WooCommerce, by a membership plugin or by a security plugin) the browser ends up in a redirection loop.
Since version 2.4.12 the plugin detects this situation and gives up after 3 consecutive redirects, so the site stays usable, but you can also clear the flag for the users that are already affected: go to the plugin documentation tab and use the button that removes the force reset password metadata from all the users.
If you want to change how many redirects are allowed before the plugin gives up, use the acui_force_reset_password_max_redirects filter (return 0 to disable the limit):
add_filter( 'acui_force_reset_password_max_redirects', function( $max ){ return 5; } );
By default they are sent to their WordPress profile page. If WooCommerce or WP User Manager are active, they are sent to the password section of the account page of those plugins instead. You can point them anywhere else using the acui_force_reset_password_edit_profile_url filter, and you can add your own exceptions (pages where the redirection must not happen) using acui_force_reset_password_redirect_condition.
Yes. At Codection we help you to import, migrate, synchronize or update your users. Write to contacto@codection.com.
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. Report a security vulnerability.
Thank you! A review in wordpress.org helps a lot, and you can also buy us a coffee.
acui_force_reset_password_edit_profile_url filtercreate_users could still save the Cron tab with their own "Path or URL of file that is going to be imported" and let the recurring import run with the privileges of an administrator. The scheduled run and "Run now" without session switched to the user selected in "User that runs the cron" (or to the first administrator when none was selected), so every per-user check in the importer passed: a CSV row with an existing administrator's username and a password reset that account's password, and the administrator running the cron could be taken over by matching its email and adding a user_email column. The Cron tab now records who saved it, and when that user cannot edit_users the import always runs as that same user (the scheduled run, "Run now" and "Run now" without session), and the "User that runs the cron" selector only offers their own account. "Run now" without session also takes the role-assignment decision from the user who configured the task instead of from the user who clicks the buttoncreate_users could still change other users' roles without promote_users. Saving the Cron tab now requires promote_users to set "Update roles for existing users?" to anything other than "No" or to enable "Change role of users that are not present in the CSV" (until now only the target role was checked, so the option could be enabled while keeping a previously stored role). The importer also no longer removes the existing roles of updated users when the user running the import cannot assign roles, which previously left them with no role when no role was being assignedrole column and role assignment disabled): the user was re-added to the current site as Subscriber, which removed the roles they already had there. Existing members of the site now keep their roles in that case, and only users that are not yet members of the site are added as SubscriberSplFileObject::seek(), which counts physical lines in the file, while the resume position handed between batches was a count of CSV records. Any exported column whose value can contain a newline — for example the Biographical Info profile field, which is editable by every role and stored verbatim by WordPress core — could make those two counts diverge once such a value was present before the batch boundary. When they diverged, the next batch could resume in the middle of an open quoted field, and the remaining lines that a user had put inside that one cell were then parsed as top-level CSV records in their own right, under the importing administrator's own role/password-assignment capabilities. The resume position is now the exact byte offset (ftell()/fseek()) at which the last fully parsed CSV record ended, so a batch can only ever resume at a genuine record boundarycaller_can_promote_users value taken straight from the submitted form data instead of checking the current user's capability. That value is only legitimate on the Action Scheduler cron path, where it is derived from a capability at schedule time; on every request-driven import path (the manual backend importer and the AJAX batch import action the plugin UI uses) the form data is the raw request, so a user with only create_users could add caller_can_promote_users=1 to the request themselves and get the administrator role applied, including to their own account. The pre-recorded decision is now only trusted on the cron path; every request-driven path re-derives it from the current user's own capabilities (reported by yzx001)acui_frontend_change_role_not_present / acui_frontend_change_role_not_present_role options with no capability check of its own, and those options could be set by anyone able to reach the settings screen, which is gated only on create_users. A user with only create_users could point the option at administrator and then run the front-end importer to promote every existing editable-role user omitted from the CSV to administrator. Saving those two options now requires promote_users, matching the equivalent Cron tab option, and the front-end import path now also requires promote_users before honouring the option at run time (reported by BINESH MADHARAPU)[export-users] shortcode's columns attribute whitelist (added in 2.5.1 to allow the key=>Label renaming syntax) still stripping the whole attribute to empty when the custom label contained accented or other non-ASCII letters (for example columns="first_name=>Prénom"), since the whitelist only matched plain ASCII letters[export-users] shortcode dropping the columns attribute when it used the key=>Label renaming syntax (for example columns="user_email=>Email,first_name=>First name"), which caused all columns to be exported instead of just the selected ones. The = and > characters were not part of the shortcode attribute's whitelist and made it get sanitized down to an empty valueacui_export_capability filter (default edit_users) instead of sharing the acui_capability filter used by import. Previously, any site that lowered acui_capability to give a role import-only access (for example, to add_users) was also handing that same role access to the Export tab and its download/save endpoints, since both checks resolved to the exact same filter call with no way to tell them apart. The Export tab, its nav link, the plugin list "Export" action link and the export AJAX/download handlers now check the new filter independently, so an import-only role stays import-only unless the new filter is explicitly overriddenfputcsv(..., '"', "\0")), but the importer's SplFileObject::fgetcsv() calls were passing only the delimiter, which silently kept PHP's default backslash escape character. Any registered user able to save their own profile could set display_name to a value ending in a comma and a backslash (e.g. a,\) and nickname to a value starting and ending with a comma around a role name (e.g. ,administrator,q). When an administrator later used the plugin's own Export tab and re-imported that file with "Update existing users" and "Update roles for existing users" both set to "yes" — the plugin's documented backup/migration workflow — the escape mismatch merged the display_name cell into the role column and split the nickname cell, so the parsed role column for the attacker's own row read exactly administrator, and the administrator's own authorized import call applied it. The importer's fgetcsv() calls now use the same explicit escape character as the exporter, so no combination of profile field values can shift the parsed column boundariesadministrator role during an import now additionally requires the create_users capability (not only promote_users) on the account running the import. This does not change behavior on sites using the plugin's own default access gate, but stops a future column-shift bug — or a site that has lowered the acui_capability filter to allow non-administrators to run imports — from being able to deliver an administrator role assignment through a CSV. Other roles present on the same row are unaffected; only administrator is dropped (with a warning) when create_users is missingacui_fire_cron_no_session no-session action; it did not close the same gap on a genuinely unattended run of the recurring import (an Action Scheduler queue tick, with no $caller_can_promote_users argument at all). A user with only create_users could leave the Cron tab's default role empty (so the promote_users gate on that field was never tripped), point the recurring import at an attacker-controlled CSV with its own role column set to administrator, and activate it. On the next unattended tick, the execution user still falls back to the site's first Administrator, and the per-row role check evaluated that substituted Administrator's own capability rather than the capability of whoever had actually configured the task, so the CSV-supplied administrator role was applied. Whether an unattended cron run may apply any role, including one carried in the CSV's own role column, is now decided by the promote_users capability of the user who last saved the Cron tab settings, recorded at save time, instead of being re-derived from the (possibly substituted) execution user at run timecreate_users to run at all, but let the request also enable "delete users not present" and "change role of users not present" without holding delete_users or promote_users respectively — the same gap that the Cron tab already had fixed in 2.4.15. Both options on the manual import now also require the matching capabilityacui_fire_cron_no_session) itself, nor the role that a CSV row can carry in its own role column. A user with only create_users could still save an attacker-controlled file path (not gated by promote_users) and trigger that no-session run, which clears the current user and falls back to the site's first Administrator; the per-row role check then saw that substituted Administrator's capabilities instead of the actual caller's, so a role of administrator delivered through the CSV itself (rather than the stored default) was still accepted. The role assignment check on every cron-triggered run, including multi-step batches, now uses the capability of the user who actually triggered the run instead of the capability of the substituted execution useracui_cron_save_settings) checked only the shared plugin nonce and, for the "User that runs the cron" field, that the selected user held the same broad menu capability (create_users by default) as whoever was saving. This let a user with create_users but not promote_users (or delete_users) select an Administrator as the execution identity, set the default role to administrator, or enable "delete users not present"/"change role of users not present", and then trigger the "Run now" no-session action, which runs the import with no logged-in user and falls back to the site's first Administrator. The promote_users check on role assignment and the missing capability checks on user deletion and role change only saw that substituted Administrator, not the actual caller, so a delegated importer could create a new Administrator account or delete/demote existing users. The Cron tab now requires promote_users to set a default role, to set the "change role of users not present" role, or to select an execution user that itself has promote_users, and requires delete_users to enable "delete users not present"acui_allowed_local_csv_base_dirs filter so a developer can whitelist extra local base folders for the CSV path (e.g. a folder an external process writes to), without disabling the underlying security check added in 2.4.3169.254.0.0/16, including the cloud metadata endpoint 169.254.169.254) and carrier-grade NAT (100.64.0.0/10, 198.18.0.0/15) hosts, and re-validates every redirect hop against the same SSRF blocklist instead of letting download_url() follow redirects unchecked. This closes the same class of Server-Side Request Forgery that was already fixed for the BuddyPress/BuddyBoss bp_avatar import in 2.4.3/3.x, but that fix had not been applied to the main CSV-by-URL import pathConference) instead of its slug (conference_member), the error now points to the right slug instead of only saying that the role does not existrole column were lowercased but compared against the role slugs as they are stored, so those roles were always rejected as non existing or invalidACUI_Helper::get_editable_roles() uses wp_roles() instead of reading the $wp_roles global directly, which could still be uninitialized in cron or front end imports, leaving the list of editable roles empty and making every role of the CSV failrole cell containing the :: list separator no longer produces a fatal error when the row is preparedhome_url() string comparison because of trailing slashes, www, https or a language prefix, an account page built with blocks or a page builder instead of the shortcode...) sent the user back and forth forever. The redirection is now skipped when the user is already on the destination URL, it does not run on AJAX, REST, cron, XML-RPC or non GET requests, and a counter stops it after 3 consecutive redirects (filterable through the new acui_force_reset_password_max_redirects hook) so the worst case is that the password change is not enforced instead of the site being unreachabletemplate_id form field was passed straight to wp_update_post() without checking the post type or current_user_can( 'edit_post' ), so a user with only the create_users capability could overwrite the title and the content of any post or page of the site (and inject arbitrary CSS through the <style> tag the email editor allows) just by changing that hidden field. The plugin now validates that the id belongs to an acui_email_template post the current user is allowed to edit, and shows a warning notice instead of saving when it does not (reported by Averon Averenkov (averonsec.com))billing_* and shipping_*) are imported again. The 2.4.9 security fix blocked every field returned by acui_restricted_fields from being saved as user meta, but that filter is public and add-ons extend it, so the 20 WooCommerce customer fields (and any field added by a third party through that filter) stopped being imported. The sensitive keys are now listed apart in ACUIHelper()->get_forbidden_meta_fields(), filterable through the new acui_forbidden_meta_fields hook, and acui_restricted_fields goes back to being only about column mappingacui_post_import_single_user, which runs after print_row_imported() has already closed the <tr>, so those cells fell outside the row and every row was two columns short. There is a new acui_row_table_extra_rows action to print cells inside the row, and the add-on now prints exactly two cells per row (one for the warnings and one for the errors) instead of one cell per messagewp_capabilities, wp_user_level, role, Username, Email) from being written as user meta during the import is now case insensitive, so a column header like WP_Capabilities cannot get through itacui_delete_attachment AJAX handler now really blocks the deletion when the attachment is not a text/csv file. The mime type check only printed a warning and then deleted the file anyway, so a user with the create_users capability could delete any attachment of the media library (images, PDFs...) and not only the CSV files the plugin manages (reported by Averon Averenkov (averonsec.com))classes/csv-uploaded.php, a leftover copy of classes/tools.php (same code, class renamed) whose GUI was never called but which still registered the acui_delete_attachment and acui_bulk_delete_attachment AJAX handlers a second timeacui_fire_cron, acui_fire_cron_no_session), remove the email attachment (acui_mail_options_remove_attachment) and send the test email (acui_send_test_email) now check current_user_can() in addition to the nonce, matching the rest of the plugin's AJAX endpoints. They were relying on the nonce alone for authorization (reported by Averon Averenkov (averonsec.com))#action_assign_post column now checks current_user_can( 'edit_post', $post_id ) before reassigning the post author, and silently skips any post id that fails the check. Previously a user with only the create_users capability could take over the authorship of any post on the site (including admin-authored ones) just by putting its id in that column (reported by Averon Averenkov (averonsec.com))update_user_meta() without an authorization check, and sensitive keys (wp_capabilities, wp_user_level, role, Username, Email) are now hard-blocked from this fallback path. Previously a user with only the create_users capability (e.g. a Shop Manager, or any role delegated CSV-import rights) could escalate their own account to Administrator by uploading a CSV with a wp_capabilities columnmaybe_update_email()) now normalizes both the stored and CSV emails with strtolower(trim()) before comparing, so a case difference (e.g. John.Doe@Example.com vs john.doe@example.com) no longer triggers a false "email changed" event, unnecessary wp_update_user() calls, or duplicate account creationcreate update-emails option), the new account's username is now derived from the row's first_name/last_name when available (e.g. JohnDoe, with JohnDoe2, JohnDoe3... on collision) instead of always falling back to an opaque duplicated_username_XXXXXX loginbp_member_type CSV column is now matched case-insensitively against the header row, consistent with how password/user_pass are already matchedbp_member_type (Profile Type) import/export column, which was previously undocumented in the in-plugin help textrole column now correctly trims leading/trailing spaces from each comma-separated value (e.g. executive_member, tracker_exclude). The previous code called array_walk( $roles_cells, 'trim' ), which is a no-op because trim() does not modify its argument by reference, so roles with a stray space (as commonly added by spreadsheet tools like Google Sheets) were silently treated as invalid and ignoredgroup_id/group_name columns) now also trims each comma-separated value before matching it against an existing group, avoiding the same issue when assigning multiple groups per usersanitize_text_field() before being stored as user meta in save_extra_user_profile_fields(), closing a stored XSS vector where a low-privileged user (e.g. Subscriber) could stash an HTML/JS payload in a custom column (reported by Luca Laytynher (LyT))esc_html() before being rendered, preventing a stored XSS payload from executing in the administrator's browser via export.js's .html() insertion (reported by Luca Laytynher (LyT))bp_avatar CSV import no longer falls back to a raw file_get_contents() call for values that are neither a numeric attachment ID nor an http(s) URL, closing an arbitrary local file read / PHP stream wrapper vector (e.g. file:///etc/passwd, php://filter) (reported by Binesh Madharapu)bp_avatar remote URL fetch now disables automatic redirect following and re-validates every redirect hop against the same SSRF blocklist used for the initial URL, preventing an attacker-hosted URL from bypassing the gate via a 3xx redirect to an internal or cloud metadata address (reported by Binesh Madharapu)bp_avatar CSV import now also rejects link-local (169.254.0.0/16), carrier-grade NAT (100.64.0.0/10, 198.18.0.0/15) and other private IP ranges after resolving the URL's host, closing the remaining part of the SSRF where wp_safe_remote_get() alone still allowed requests to the cloud metadata endpoint 169.254.169.254 (reported by Binesh Madharapu)bp_avatar CSV import now fetches remote URLs with wp_safe_remote_get() instead of file_get_contents(), preventing a Server-Side Request Forgery that let an admin-supplied URL make the server request internal hosts, cloud metadata endpoints, or scan internal ports (reported by Binesh Madharapu)path_to_file field (Tools > Import and export users and customers) now requires a local path to have a .csv extension and to resolve inside the WordPress uploads directory, closing an arbitrary file read that allowed reading server files such as /etc/hosts, logs or config files (reported by Centesiman)current_user_can('promote_users') check (plus filtering against the actor's editable roles) before applying any role during import, preventing a user with only create_users from creating or promoting an account to Administratorcurrent_user_can('edit_user', $user_id) check before the raw user_pass hash and any other wp_users core field (e.g. user_email) reach the database for an existing user during importcurrent_user_can('edit_user', $user_id) check before an existing user's email is changed via wp_update_user() when updating users by matching usernameacui_email_template_selected AJAX handler now requires edit_others_posts (filterable via acui_capability) and verifies the requested post's post_type is acui_email_template, preventing a low-privilege authenticated user (e.g. Subscriber) from using the endpoint to read the title/content of arbitrary posts, including drafts and private posts, by IDacui_refresh_enable_email_templates AJAX handlercodection-security AJAX nonce is no longer generated on admin screens the current user isn't allowed to act oncurrent_user_can('edit_user', $user_id) check before every wp_set_password() call during import, preventing a user with create_users access from resetting passwords of accounts they are not authorised to editallow_update_emails vs update_emails_existing_users)maybe_enable_wordpress_core_emails never actually re-enabling the filters, because anonymous closures cannot be removed with remove_filterignored user count is now tracked in the results array and propagated correctly across batch steps