Migrations

Migrate user accounts and roles between two separate WordPress installs

A user-migration scenario for moving accounts between two standalone WordPress installs, covering ID collisions, custom role remapping, and membership-plugin metadata tied to specific user IDs.

Works with Claude / GPT76 uses 3.9

The prompt

migrations-user-accounts-roles-between-installs
I need to move [roughly 800] user accounts from [siteA.com] to [siteB.com], two
completely separate WordPress installs (not multisite), because a client is
consolidating a membership community from the old site into the new one. Both sites
use a membership plugin ([MemberPress]) that stores subscription and access data as
user meta tied to specific user IDs.

Plan this migration so accounts, roles, and their membership access all survive the
move correctly, addressing what a plain "export/import users" plugin won't handle on
its own:

1. ID collision risk: siteB.com already has its own users with their own IDs. Explain
   why importing siteA's users naively (preserving their original IDs) risks silently
   overwriting or colliding with an existing siteB user who happens to already occupy
   that same ID, and the correct approach (importing with fresh IDs on the target and
   maintaining an old-ID-to-new-ID mapping table for the rest of the migration to
   reference).
2. Password handling: since both are WordPress installs using the same phpwhatever
   password hashing, explain whether existing password hashes can carry over directly
   so users don't have to reset passwords, and what to check to confirm this
   actually works rather than assuming it.
3. Role remapping: if siteB has custom roles with different names or capabilities than
   siteA's roles (even ones that sound the same, like "member" on one site not having
   the same capabilities as "member" on the other), explain how to build an explicit
   mapping between the two sites' role definitions before import, rather than assuming
   roles with matching names behave identically.
4. Membership plugin metadata: MemberPress and similar plugins store subscription
   status, expiration dates, and access-level data as user meta keyed to the WordPress
   user ID. Using the ID mapping table from step 1, explain how to remap this meta so
   each migrated user's subscription status and access level land correctly on their
   new ID on siteB, instead of orphaning that data or attaching it to the wrong user.
5. Verification: a sampling approach to confirm a handful of migrated accounts can
   actually log in, retain the correct role, and still have active membership access
   on siteB before running the migration against all 800 accounts.

Give me the ID-mapping-based approach as the backbone of this migration, since
everything else (roles, membership meta, post authorship if any) depends on getting
that mapping right first.

The whole migration hinges on one artifact: the old-ID-to-new-ID mapping table. Every downstream step (roles, membership meta, authorship) is really just “look up the new ID and attach this data to it,” so getting that mapping right before touching anything else is what determines whether this goes smoothly.