DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
comments

How to Move Comments Between WordPress Posts Safely

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress attaches each comment to a post through the comment’s comment_post_ID. To move comments, change that value from the source post ID to the destination post ID. The safest workflow is to back up the database, verify both posts and the table prefix, update only the intended comments, and then check replies, moderation states, counts, caches, and the rendered destination post.

What “moving comments” changes

A comment is not copied to another post by changing the post’s title or URL. Its association is stored in the wp_comments.comment_post_ID column (the table may have a different prefix). Changing that association makes the existing comment appear under the destination post while retaining its comment ID, author data, content, approval state, and parent relationship.

Moving comments is different from importing them as new comments. A move should preserve the existing records; do not delete and recreate them unless you have a separate, tested migration plan.

Choose the approach that fits your site

Approach Strength Risk or limitation Best fit
Database update Directly targets comments associated with a source post and can handle a precisely defined set. Requires database access and careful backup, prefix, ID, and cache verification. It bypasses WordPress application-level handlers. An administrator comfortable with SQL and recovery procedures.
WP-CLI inspection and update WordPress-aware tools can inventory comments and expose IDs, post IDs, parent IDs, and moderation status. The official examples reviewed do not demonstrate a guaranteed command for changing comment_post_ID. Exact field support must be checked on the installed WP-CLI version. An administrator who can inspect local command help and test safely.

Do not rely on a plugin named in an older support discussion: that discussion reported its removal because of security issues. That report does not establish that every current plugin is unsafe, but it is not evidence for recommending that plugin or any unverified replacement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before changing anything

  • Put the site in a maintenance window if comments are actively arriving.
  • Create a database backup that you can restore, and confirm that the backup is usable.
  • Record the source and destination post IDs. Do not infer IDs from titles alone.
  • Confirm the real comments-table prefix; wp_comments is only the default example.
  • Decide whether every comment on the source post should move or only a selected set.
  • Note the source comment IDs, current approval values, parent IDs, and counts before the change.
  • Check for plugin, theme, moderation, analytics, or cache behavior that depends on the original post association.

Method 1: Update the association in the database

The commonly circulated SQL pattern is conceptually:

UPDATE wp_comments
SET comment_post_ID = NEW_POST_ID
WHERE comment_post_ID = OLD_POST_ID;

This is community guidance, not an official WordPress migration recipe. Never paste it unchanged. Replace the table name and IDs with verified values, and narrow the WHERE clause when only some comments should move.

1. Verify the posts and target comments

Use your database tool to confirm that both IDs exist and represent the intended posts. Then inventory the comments using the actual table prefix:

SELECT comment_ID, comment_post_ID, comment_parent, comment_approved
FROM actualprefix_comments
WHERE comment_post_ID = OLD_POST_ID
ORDER BY comment_ID;

For a selected set, identify the exact comment IDs first. A safer scope is an explicit ID list combined with the source-post check:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
SELECT comment_ID, comment_post_ID, comment_parent, comment_approved
FROM actualprefix_comments
WHERE comment_post_ID = OLD_POST_ID
  AND comment_ID IN (COMMENT_ID_1, COMMENT_ID_2);

2. Record a recoverable change set

Save the inventory output and the intended source and destination IDs. If your database system supports transactions and your operational process permits them, perform the update inside a transaction so you can inspect the result before committing. A backup remains essential even when a transaction is available.

3. Update only the intended rows

For every comment on the source post:

UPDATE actualprefix_comments
SET comment_post_ID = NEW_POST_ID
WHERE comment_post_ID = OLD_POST_ID;

For selected comments:

UPDATE actualprefix_comments
SET comment_post_ID = NEW_POST_ID
WHERE comment_post_ID = OLD_POST_ID
  AND comment_ID IN (COMMENT_ID_1, COMMENT_ID_2);

Keep the source-post condition even when using an ID list; it prevents an accidental move if a comment has already been changed.

4. Verify before finishing

Re-run the inventory against both posts. Confirm that the expected IDs now have the destination post ID, that unrelated comments did not change, and that comment_parent values still describe the intended reply threads. Check comment_approved so pending, spam, and approved comments retain their moderation state.

Method 2: Use WP-CLI for inventory and version-specific testing

WP-CLI’s wp comment commands support listing, creating, updating, deleting, and moderating comments. Listing is useful for confirming the migration scope and recording the fields that must remain intact:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wp comment list --post_id=OLD_POST_ID 
  --fields=comment_ID,comment_post_ID,comment_parent,comment_approved 
  --format=table

Run wp help comment list and wp help comment update on the site to confirm the syntax and fields provided by the installed version. The official reference reviewed does not show a specific, guaranteed example that updates comment_post_ID; do not assume a generic update command will perform this migration. If local help does not clearly support the field, use a tested database procedure or obtain a WordPress-aware migration implementation that documents the behavior.

After any WP-CLI-based operation, perform the same ID, reply, moderation, display, count, and cache checks described below.

Post-move verification checklist

  1. Row scope: Compare the before-and-after comment ID lists. The intended comments should move; unrelated rows should not.
  2. Destination rendering: Open the destination post while logged out and logged in, if those views differ, and confirm the comments appear there.
  3. Reply structure: Inspect threaded conversations and make sure parent comments and replies still form the expected tree.
  4. Moderation: Confirm approved, pending, spam, and trashed states were not unintentionally altered.
  5. Counts: Compare displayed and stored counts for both posts. A direct SQL update bypasses WordPress application-level handlers, so do not assume counts were recalculated.
  6. Caches: Purge the relevant page, object, CDN, or full-page caches if the old or new display is stale.
  7. Links and notifications: Check comment links, feeds, email notifications, and any plugin metadata that may have been tied to the original post.

WordPress-aware deletion operations perform related count and cache work in circumstances documented by wp_delete_comment(); that documentation does not establish that a direct association update performs the same maintenance. Treat stale counts or displays as issues to verify and repair through your site’s normal WordPress-aware maintenance workflow.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failure modes and recovery

The update affected too many comments

Stop publishing changes, restore from the verified backup or reverse the update using the recorded original associations, and re-check the row count before trying again with a narrower condition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The comments moved but counts are wrong

Do not edit count fields blindly. Clear relevant caches, then use the site’s normal WordPress-aware recount or maintenance process and verify the resulting totals against the actual comment rows.

Replies look detached

Inspect comment_parent for the affected IDs and their parent comments. Do not rewrite parent IDs unless your intended migration includes the complete thread and you have mapped every relationship.

The destination post shows no comments

Check that the destination post ID is correct, the comments are not filtered by status or type, and cached HTML is cleared. Re-run the database or WP-CLI inventory to distinguish a display problem from an incomplete update.

Recommended decision

For a small, controlled migration, first inventory the comments with WP-CLI or SQL, then use a backed-up, tightly scoped database update only if you can verify the result and recover it. Use WP-CLI as a WordPress-aware inspection and testing layer, but do not present an unverified field-specific update command as guaranteed. In every case, preserve the comment IDs and moderation data, verify threaded replies, and treat counts and caches as separate post-migration checks.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.