WordPress should give this option below Attribute all posts to:
Anyhow, I wrote a post on this (Clean Comments Table After User Deleted)
Edit
Also, you can move your all posts from deleted users to admin user.
global $wpdb;
$admin_id = 1; // Assign admin user id here
$posts_table = $wpdb->prefix . 'posts';
$users_table = $wpdb->prefix . 'users';
$strQuery = "UPDATE `$posts_table` SET post_author = $admin_id WHERE post_author NOT IN (SELECT ID FROM $users_table)";
echo $strQuery;
$wpdb->query($strQuery);
Related Posts:
- Allow the comment author to delete their own comments
- Remove the deleted user comment
- Let user delete comment on front end only
- Deleting users do not deletes coments
- Commenting in user profile page?
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Show content only if member left a comment
- What are the current recommended best-practices for comments.php?
- Post comment as different user than logged in
- Threaded comments – deleting parent comment leads to orphan comments
- Does WordPress Allow Blank/Empty Comment Submissions In WordPress?
- Can I change what fields are displayed in the Comments form?
- Is it possible to move a comment that should be a reply to another comment?
- I have tried using Plugins to remove 72K comments with no success
- Get most active users sort by comment count
- WordPress comments email notification for authors
- List User Comments on User Profile BuddyPress [closed]
- Hold comments for moderation only if user is not logged in
- Display WordPress commenter nice name
- Check if someone recently commented in one of my posts
- Highlighting the current users comment
- Display the number of unseen comments on a page since the user last visit
- Change order of comment fields
- How to auto empty comment trash after X days
- All users/comments suspected as bot? [closed]
- Display Custom comments field number
- Commenting in user profile page?
- if user role is then echo text
- Anonymize comments after one year
- How can I get list of emails of users who commented on a post?
- Best way to tell if a comment is from a user?
- Custom comment field not showing when logged-in
- Adding comments section to website integrated WordPress instance
- get_comment_author_link not working properly
- My posts show 2 comment forms
- Problem in getting user comments permalinks
- Disallowed Tag Present in AMP WordPress ()
- wp list all users who haven’t commented on a post
- Delete comments function
- I want to limit registered user to 1 comment per post in WordPress
- I have tried using Plugins to remove 72K comments with no success
- selectively disable akismet
- How to display comments by logged in user and responses?
- Passing user meta through comment form
- Semi-Private Comments + page comments -> is it possible?
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Comments waiting but no comments found
- Programmatically block commenting by restricting view of comment form
- Disqus over the default commenting engine, what are some pros and cons?
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Plugin from WordPress.com for comment notification…available? [closed]
- How to add text to comment form #content textarea?
- Extra User Profile Field Upload File / Image
- How can I highlight admin comments?
- Why are my comments closed?
- Block comments from search engine indexing
- Set user loggin status?
- Create a “Reject” action for comments?
- Changing “submitted on date” of comments
- Filter custom comment type from Manage Comments & Dash Widgets
- Add Div to Comment Form
- How to add a strip of visual editor on top of comments textarea
- Threaded comments not working
- Customizing comments pagination for bootstrap
- woocommerce allow users to select or use avatar
- User’s total comment count excluding comments on their own posts
- How to allow logged in users to post anonymously
- Error While Sending Comment
- comment_reply_link not work with me
- How to allow duplicate comments AND without comment text
- Only allow the post author and admin to comment on a post
- Custom Comment Notifications Fire on each Page Load
- Add an attachment feature to comments
- How to display custom comment fields onto any page
- Admin Dashboard – Recent Comments source
- After submit comments select the current tab
- Custom comment types. Are they a possibility?
- Embedding local video in WordPress comments
- Author name length character limit?
- How to fix slow comment query?
- Migrate comments and likes wordpress.com to selfhosted site
- How to enable truly anonymous posting in bbPress forums? [closed]
- Admin – Dashboard – Unset recent comments
- How does WordPress generate a comment website preview?
- Front End User(bloger) turn on and off his comments
- Does not show comment list
- Custom search by several options send on form not works
- Change comment author after new comment posted
- Show ‘add comment’ link for status updates in Twenty Thirteen
- Pull & display new comments without refreshing the page
- User registration add user ID?
- Can I use WP comments for custom tables?
- How to fix vanilla comments extra iframe space
- writing a plugin, how to disable the comment form altogether?
- What filter or action to replace comments or add new comment system
- Function to get a list of all comments on 1 post [closed]
- Auto delete WordPress comments
- User Query Multiple Orderby Clause
- TinyMCE in comment reply form showing toolbar but can’t edit reply
- Undefined Function Fatal Error with Shortcode [closed]