Choose the survivor and freeze the other site
A merge is a one-way import into the site that already has the most of what you cannot easily rebuild: paying members, order history, LMS progress and the stronger domain. The retired site becomes a source of content and users, then a redirect host.
Freeze the retired site before export. Turn off new registrations and sales there, or at least note the time of the export so you can catch up anything that arrives later. A merge that runs over several days without a freeze ends with students who bought on the old site and do not exist on the new one.
Import order
For users, wp user list exports ID, user_login, display_name, user_email, user_registered and roles by default. wp user import-csv matches existing users by email or login and updates them unless you pass --skip-update. On a merge, use --skip-update: a student who has accounts on both sites keeps the survivor's account untouched instead of having its display name or role overwritten by the retired site's copy.
For content, wp export can split by post type and author and writes files of 15 MB by default (--max_file_size). wp import reads a WXR file through the WordPress Importer plugin; --authors=mapping.csv reads an author map from a CSV, or creates one for you to edit if the file does not exist. Generate the map once, fill it in so each old author points to the matching survivor account, then import.
| Step | Tool | Why this order |
|---|---|---|
| 1. Users | wp user list --format=csv on the old site, wp user import-csv --skip-update on the survivor | Authors and students must exist before content and enrollments can point to them |
| 2. Taxonomies and content | wp export by post type, wp import --authors=mapping.csv | Author mapping needs the users from step 1 |
| 3. Media | Import attachments with the content, or copy uploads and regenerate | Large libraries can exhaust memory; split exports |
| 4. LMS courses, lessons, quizzes | The LMS plugin's own export or import tool, or WXR for the post types | Course structure is often stored in meta that references other post IDs |
| 5. Enrollments and progress | Rebuild from a mapped CSV | Must use the new user and course IDs |
| 6. Redirects | Server rules or the Redirection plugin | Only once every new URL is known |
ID conflicts and what they break
Every post, page, course, lesson, attachment, user and term on the retired site has a numeric ID. The survivor already uses many of the same numbers, so imported items get new ones. The WordPress Importer changelog notes that attachment IDs change on import, and it skips a piece of attachment meta for exactly that reason.
Anything that stores an old ID as plain data will then point at the wrong item or nothing at all. The importer rewrites some references, such as attachment and site URLs in content and block attributes in recent versions, but it cannot know about every plugin's private data.
| Reference | Example | Risk after merge | Fix |
|---|---|---|---|
| Shortcodes with IDs | A shortcode that embeds course 412 | Shows the wrong course or nothing | Search content for shortcodes and remap IDs |
| Gallery and featured images | Attachment IDs in post meta | Missing or wrong images | Check after import; regenerate if needed |
| Course structure | Lessons linked to a course ID in meta | Lessons orphaned from their course | Use the LMS export tool, or rebuild links |
| Enrollments and progress | User ID and course ID pairs | Access granted to the wrong person or course | Rebuild from a CSV mapped to new IDs |
| Menus | Menu items pointing at post IDs | Broken or missing menu entries | Rebuild menus on the survivor |
| Hard-coded URLs | Links to olddomain.com/lesson-x | Links cross back to the retired domain | Search-replace after import, then redirects |
Users who exist on both sites
Match on email, not username. Two different people can share a username across sites, and one person often has two usernames. Before importing, join both user exports on lowercased email and sort the result into three groups: only on the survivor, only on the retired site, and on both.
Students only on the retired site are new accounts and will need to set a password unless you are copying the users table with its hashes intact. Students on both keep their survivor account; you only need to add the retired site's course access to it. Write down which group each student is in, because your announcement email should differ: "your login has not changed" versus "set a password for your account".
- Lowercase and trim emails before matching.
- Flag accounts with administrator or editor roles on the retired site and review them by hand rather than importing the role.
- Keep the join file; you will need it again for enrollments.
Redirect map for the retired domain
Google's site-move guidance recommends server-side permanent redirects (301 or 308), mapping each old URL directly to its final new URL, and keeping redirects for as long as possible, generally at least one year. It warns against sending many old URLs to an irrelevant page such as the new homepage, and recommends a Change of Address submission in Search Console when the move crosses domains. That means the retired domain must stay registered and keep serving redirects for at least that year.
Build the map from data, not memory: list every published URL on the retired site from its sitemap or wp post list, then add the new URL from the survivor once the import is done. The Redirection plugin can import and export redirects as CSV, log 404s and export rules for Apache or Nginx, which helps if you prefer to serve redirects from the server.
| Old URL type | Redirect to | Notes |
|---|---|---|
| Course sales page | The matching course on the survivor | Highest value; test each one |
| Lesson URL | The same lesson on the survivor | Logged-out visitors will hit the login wall; that is expected |
| Blog post | The imported post, or the closest topic page | Do not send everything to the homepage |
| Login and account pages | The survivor's login page | Put the date of the move in the login page notice |
| Retired or merged content | The page that replaced it | Only if one clearly replaced it |
| Uploads and PDFs | The new media URL | Often linked from emails and other sites |
Acceptance checklist
- Counts: users, posts per type, courses, lessons and attachments match expectations on the survivor.
- Ten sampled students from each user group can log in and see the right courses.
- No shortcode or block still references a retired-site ID; spot-check course pages.
- Search for the old domain in content and options returns nothing that should have been rewritten.
- Every URL in the redirect map returns one 301 hop to a 200 page.
- Search Console Change of Address submitted for the retired domain.
- Retired domain renewal set for at least another year.
Questions before you decide
Should I import users or content first?
Users first. wp import maps authors to existing accounts through --authors, and enrollments need user IDs that already exist on the survivor.
Why did my images or course links break after importing?
Imported items get new IDs on the survivor. The WordPress Importer changelog notes attachment IDs change on import, so anything storing old IDs, such as shortcodes, meta and menus, needs remapping.
How long should redirects from the old domain stay?
Google recommends keeping site-move redirects for as long as possible, generally at least one year, and mapping each old URL to its specific new URL rather than the homepage.
Will wp user import-csv overwrite accounts that exist on both sites?
By default it updates users it matches by email or login. Pass --skip-update on a merge so the survivor's accounts stay as they are.
Sources & verification
Product details and prices can change. Check the linked provider before buying.
- WP-CLI: wp export Accessed 30 Oct 2026
- WP-CLI: wp import Accessed 30 Oct 2026
- WordPress.org: WordPress Importer plugin Accessed 30 Oct 2026
- WordPress advanced administration: Importing content Accessed 30 Oct 2026
- WP-CLI: wp user list Accessed 30 Oct 2026
- WP-CLI: wp user import-csv Accessed 30 Oct 2026
- Google Search Central: Site moves with URL changes Accessed 30 Oct 2026
- WordPress.org: Redirection plugin Accessed 30 Oct 2026
Sources link directly to providers. Product buttons may use separately labeled affiliate links. Read our disclosure.